org.xerial.util.cui
Class Option<OptionID extends Comparable>

java.lang.Object
  extended by org.xerial.util.cui.Option<OptionID>

public class Option<OptionID extends Comparable>
extends Object

Option represents a command line option

Author:
leo

Field Summary
protected  String _longName
           
protected  String _shortName
           
 
Constructor Summary
Option(OptionID optionID, String shortOptionName, String longOptionName, String description)
           
 
Method Summary
protected  void activateParentGroup()
           
protected  void collectOptionDescriptions(org.xerial.util.cui.OptionDescriptionContainer container)
           
protected  void collectOptionID(List<OptionID> optionIDList)
           
protected  Option<OptionID> findByLongOptionName(String longOption)
           
protected  Option<OptionID> findByShortOptionName(String shortOption)
           
protected  Option<OptionID> findOption(OptionID optionID)
           
 String getDescription()
           
 String getLongOptionName()
           
 OptionID getOptionID()
           
protected  OptionGroup<OptionID> getParent()
           
 String getShortOptionName()
           
 boolean isSet()
           
 void set(String[] args, int argIndex)
           
protected  void setParent(OptionGroup<OptionID> parentGroup)
           
 boolean takeArgument()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_shortName

protected String _shortName

_longName

protected String _longName
Constructor Detail

Option

public Option(OptionID optionID,
              String shortOptionName,
              String longOptionName,
              String description)
Method Detail

isSet

public boolean isSet()

set

public void set(String[] args,
                int argIndex)

getOptionID

public OptionID getOptionID()

takeArgument

public boolean takeArgument()

findByLongOptionName

protected Option<OptionID> findByLongOptionName(String longOption)

findByShortOptionName

protected Option<OptionID> findByShortOptionName(String shortOption)

findOption

protected Option<OptionID> findOption(OptionID optionID)

collectOptionID

protected void collectOptionID(List<OptionID> optionIDList)

collectOptionDescriptions

protected void collectOptionDescriptions(org.xerial.util.cui.OptionDescriptionContainer container)

getLongOptionName

public String getLongOptionName()

getShortOptionName

public String getShortOptionName()

getDescription

public String getDescription()

setParent

protected void setParent(OptionGroup<OptionID> parentGroup)

getParent

protected OptionGroup<OptionID> getParent()

activateParentGroup

protected void activateParentGroup()


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.