com.vividsolutions.jump.util.commandline
Class OptionSpec

java.lang.Object
  extended by com.vividsolutions.jump.util.commandline.OptionSpec

public class OptionSpec
extends java.lang.Object

Specifes the syntax for a single option on a command line. ToDo:

 - add syntax pattern parsing
      Syntax patterns are similar to Java type signatures
  F - float
  I - int
  L - long
  S - string
  B - boolean
  + - one or more
 eg:  "FIS+" takes a double, int, and one or more Strings
 


Field Summary
static int NARGS_ONE_OR_MORE
           
static int NARGS_ZERO_OR_MORE
           
static int NARGS_ZERO_OR_ONE
           
static java.lang.String OPTION_FREE_ARGS
           
 
Constructor Summary
OptionSpec(java.lang.String optName)
           
OptionSpec(java.lang.String optName, int nAllowed)
           
OptionSpec(java.lang.String optName, java.lang.String _syntaxPattern)
           
 
Method Summary
 java.lang.String getArgDesc()
           
 java.lang.String getDocDesc()
           
 int getNumOptions()
           
 Option getOption(int i)
           
 java.util.Iterator getOptions()
           
 boolean hasOption()
           
 void setDoc(java.lang.String _argDoc, java.lang.String docLine)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NARGS_ZERO_OR_MORE

public static final int NARGS_ZERO_OR_MORE
See Also:
Constant Field Values

NARGS_ONE_OR_MORE

public static final int NARGS_ONE_OR_MORE
See Also:
Constant Field Values

NARGS_ZERO_OR_ONE

public static final int NARGS_ZERO_OR_ONE
See Also:
Constant Field Values

OPTION_FREE_ARGS

public static final java.lang.String OPTION_FREE_ARGS
See Also:
Constant Field Values
Constructor Detail

OptionSpec

public OptionSpec(java.lang.String optName)

OptionSpec

public OptionSpec(java.lang.String optName,
                  int nAllowed)

OptionSpec

public OptionSpec(java.lang.String optName,
                  java.lang.String _syntaxPattern)
Method Detail

setDoc

public void setDoc(java.lang.String _argDoc,
                   java.lang.String docLine)

getArgDesc

public java.lang.String getArgDesc()

getDocDesc

public java.lang.String getDocDesc()

getNumOptions

public int getNumOptions()

getOption

public Option getOption(int i)

getOptions

public java.util.Iterator getOptions()

hasOption

public boolean hasOption()