/lib/JSAP/doc/javadoc/com/martiansoftware/jsap/UnflaggedOption.html
HTML | 591 lines | 506 code | 60 blank | 25 comment | 0 complexity | fbb9783b380ecf578fa157421eade6c8 MD5 | raw file
Possible License(s): LGPL-2.1, BSD-3-Clause, Apache-2.0
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <!--NewPage-->
- <HTML>
- <HEAD>
- <!-- Generated by javadoc (build 1.4.2_08) on Thu Aug 03 20:30:44 EDT 2006 -->
- <TITLE>
- UnflaggedOption (JSAP: the Java Simple Argument Parser)
- </TITLE>
- <META NAME="keywords" CONTENT="com.martiansoftware.jsap.UnflaggedOption class">
- <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
- <SCRIPT type="text/javascript">
- function windowTitle()
- {
- parent.document.title="UnflaggedOption (JSAP: the Java Simple Argument Parser)";
- }
- </SCRIPT>
- </HEAD>
- <BODY BGCOLOR="white" onload="windowTitle();">
- <!-- ========= START OF TOP NAVBAR ======= -->
- <A NAME="navbar_top"><!-- --></A>
- <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
- <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
- <TR>
- <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
- <A NAME="navbar_top_firstrow"><!-- --></A>
- <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
- <TR ALIGN="center" VALIGN="top">
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
- <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
- <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
- </TR>
- </TABLE>
- </TD>
- <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
- </EM>
- </TD>
- </TR>
- <TR>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../com/martiansoftware/jsap/TestUsageString.html" title="class in com.martiansoftware.jsap"><B>PREV CLASS</B></A>
- NEXT CLASS</FONT></TD>
- <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
- <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A>
- <A HREF="UnflaggedOption.html" target="_top"><B>NO FRAMES</B></A>
- <SCRIPT type="text/javascript">
- <!--
- if(window==top) {
- document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
- }
- //-->
- </SCRIPT>
- <NOSCRIPT>
- <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
- </NOSCRIPT>
- </FONT></TD>
- </TR>
- <TR>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
- <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
- DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
- </TR>
- </TABLE>
- <A NAME="skip-navbar_top"></A>
- <!-- ========= END OF TOP NAVBAR ========= -->
- <HR>
- <!-- ======== START OF CLASS DATA ======== -->
- <H2>
- <FONT SIZE="-1">
- com.martiansoftware.jsap</FONT>
- <BR>
- Class UnflaggedOption</H2>
- <PRE>
- <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A>
- <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../com/martiansoftware/jsap/Parameter.html" title="class in com.martiansoftware.jsap">com.martiansoftware.jsap.Parameter</A>
- <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../com/martiansoftware/jsap/Option.html" title="class in com.martiansoftware.jsap">com.martiansoftware.jsap.Option</A>
- <IMG SRC="../../../resources/inherit.gif" ALT="extended by"><B>com.martiansoftware.jsap.UnflaggedOption</B>
- </PRE>
- <HR>
- <DL>
- <DT>public final class <B>UnflaggedOption</B><DT>extends <A HREF="../../../com/martiansoftware/jsap/Option.html" title="class in com.martiansoftware.jsap">Option</A></DL>
- <P>
- An option whose meaning is derived from its <i>position in the argument
- list</i> rather than a flag
- that precedes it. UnflaggedOptions allow the parsing of command lines
- without flags, such as
- "compressfiles destinationFile file1 file2 file3 file4 ...", where
- "destinationFile" is the name of the
- file to create, and file1 through file 4 (and beyond) are the names of the
- files to compress. The JSAP
- that supports this command line has only two options defined: the first
- accepts a single destination file,
- and the second is "greedy," consuming the remaining unflagged options.
- <P>
- <P>
- <DL>
- <DT><B>Author:</B></DT>
- <DD><a href="http://www.martiansoftware.com/contact.html">Marty Lamb</a></DD>
- <DT><B>See Also:</B><DD><A HREF="../../../com/martiansoftware/jsap/FlaggedOption.html" title="class in com.martiansoftware.jsap"><CODE>FlaggedOption</CODE></A>,
- <A HREF="../../../com/martiansoftware/jsap/Option.html" title="class in com.martiansoftware.jsap"><CODE>Option</CODE></A></DL>
- <HR>
- <P>
- <!-- ======== NESTED CLASS SUMMARY ======== -->
- <!-- =========== FIELD SUMMARY =========== -->
- <!-- ======== CONSTRUCTOR SUMMARY ======== -->
- <A NAME="constructor_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TD COLSPAN=2><FONT SIZE="+2">
- <B>Constructor Summary</B></FONT></TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#UnflaggedOption(java.lang.String)">UnflaggedOption</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> id)</CODE>
- <BR>
- Creates a new UnflaggedOption with the specified unique ID.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#UnflaggedOption(java.lang.String, com.martiansoftware.jsap.StringParser, boolean, java.lang.String)">UnflaggedOption</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> id,
- <A HREF="../../../com/martiansoftware/jsap/StringParser.html" title="class in com.martiansoftware.jsap">StringParser</A> stringParser,
- boolean required,
- <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> help)</CODE>
- <BR>
- A shortcut constructor that creates a new non-greedy UnflaggedOption with no default value
- and configures its most commonly used settings.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#UnflaggedOption(java.lang.String, com.martiansoftware.jsap.StringParser, java.lang.String, boolean, boolean)">UnflaggedOption</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> id,
- <A HREF="../../../com/martiansoftware/jsap/StringParser.html" title="class in com.martiansoftware.jsap">StringParser</A> stringParser,
- <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> defaultValue,
- boolean required,
- boolean greedy)</CODE>
- <BR>
- A shortcut constructor that creates a new UnflaggedOption and configures
- its most commonly used settings.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#UnflaggedOption(java.lang.String, com.martiansoftware.jsap.StringParser, java.lang.String, boolean, boolean, java.lang.String)">UnflaggedOption</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> id,
- <A HREF="../../../com/martiansoftware/jsap/StringParser.html" title="class in com.martiansoftware.jsap">StringParser</A> stringParser,
- <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> defaultValue,
- boolean required,
- boolean greedy,
- <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> help)</CODE>
- <BR>
- A shortcut constructor that creates a new UnflaggedOption and configures
- its most commonly used settings.</TD>
- </TR>
- </TABLE>
-
- <!-- ========== METHOD SUMMARY =========== -->
- <A NAME="method_summary"><!-- --></A>
- <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
- <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
- <TD COLSPAN=2><FONT SIZE="+2">
- <B>Method Summary</B></FONT></TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#getSyntax()">getSyntax</A></B>()</CODE>
- <BR>
- Returns syntax instructions for this FlaggedOption.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> boolean</CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#isGreedy()">isGreedy</A></B>()</CODE>
- <BR>
- Returns a boolean indicating whether this UnflaggedOption is greedy.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html" title="class in com.martiansoftware.jsap">UnflaggedOption</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#setDefault(java.lang.String)">setDefault</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> defaultValue)</CODE>
- <BR>
- Sets a default value for this parameter.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html" title="class in com.martiansoftware.jsap">UnflaggedOption</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#setDefault(java.lang.String[])">setDefault</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] defaultValues)</CODE>
- <BR>
- Sets one or more default values for this parameter.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html" title="class in com.martiansoftware.jsap">UnflaggedOption</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#setGreedy(boolean)">setGreedy</A></B>(boolean greedy)</CODE>
- <BR>
- Sets whether this UnflaggedOption is greedy.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html" title="class in com.martiansoftware.jsap">UnflaggedOption</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#setList(boolean)">setList</A></B>(boolean isList)</CODE>
- <BR>
- Sets whether this UnflaggedOption is a list.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html" title="class in com.martiansoftware.jsap">UnflaggedOption</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#setListSeparator(char)">setListSeparator</A></B>(char listSeparator)</CODE>
- <BR>
- Sets the list separator character for this UnflaggedOption.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">
- <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
- <CODE> <A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html" title="class in com.martiansoftware.jsap">UnflaggedOption</A></CODE></FONT></TD>
- <TD><CODE><B><A HREF="../../../com/martiansoftware/jsap/UnflaggedOption.html#setRequired(boolean)">setRequired</A></B>(boolean required)</CODE>
- <BR>
- Sets whether this UnflaggedOption is required.</TD>
- </TR>
- <TR BGCOLOR="white" CLASS="TableRowColor">