dfki.util.application
Class Option

java.lang.Object
  |
  +--dfki.util.application.Option
All Implemented Interfaces:
java.lang.Cloneable

public class Option
extends java.lang.Object
implements java.lang.Cloneable

Represents a command line option. The properties of a command line option is maintaind in this class. The OptionReader uses this imformation to parse the command line.


Field Summary
static boolean MULTIPLE
           
static boolean NECESSARY
           
static boolean NEEDS_VALUE
           
static boolean NOT_NECESSARY
           
static boolean UNIQUE
           
static boolean WITHOUT_VALUE
           
 
Constructor Summary
Option(Option other)
           
Option(java.lang.String name, int code, boolean needsValue, boolean isUnique, boolean necessary, java.lang.String defaultValue)
           
Option(java.lang.String name, int code, boolean needsValue, boolean isUnique, boolean necessary, java.lang.String defaultValue, java.lang.String description)
           
 
Method Summary
 java.lang.Object clone()
           
 int getCode()
           
 java.lang.String getDefaultValue()
           
 java.lang.String getDescription()
           
 java.lang.String getName()
           
 java.lang.String getValue()
           
 java.util.Collection getValues()
           
 boolean isNecessary()
           
 boolean isUnique()
           
 boolean needsValue()
           
 void setDescription(java.lang.String d)
           
 void setValue(java.lang.String value)
           
 java.lang.String toString()
           
 boolean valueIsSet()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UNIQUE

public static final boolean UNIQUE

MULTIPLE

public static final boolean MULTIPLE

NEEDS_VALUE

public static final boolean NEEDS_VALUE

WITHOUT_VALUE

public static final boolean WITHOUT_VALUE

NECESSARY

public static final boolean NECESSARY

NOT_NECESSARY

public static final boolean NOT_NECESSARY
Constructor Detail

Option

public Option(java.lang.String name,
              int code,
              boolean needsValue,
              boolean isUnique,
              boolean necessary,
              java.lang.String defaultValue)

Option

public Option(java.lang.String name,
              int code,
              boolean needsValue,
              boolean isUnique,
              boolean necessary,
              java.lang.String defaultValue,
              java.lang.String description)

Option

public Option(Option other)
Method Detail

clone

public java.lang.Object clone()

getName

public java.lang.String getName()

getCode

public int getCode()

isUnique

public boolean isUnique()

needsValue

public boolean needsValue()

setValue

public void setValue(java.lang.String value)

getValue

public java.lang.String getValue()

getValues

public java.util.Collection getValues()

valueIsSet

public boolean valueIsSet()

isNecessary

public boolean isNecessary()

setDescription

public void setDescription(java.lang.String d)

getDescription

public java.lang.String getDescription()

getDefaultValue

public java.lang.String getDefaultValue()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object