|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.crosswire.common.options.Option
public class Option
An Option is representation of a single named parameter. An Option has a short, or a long name, or both.
It's inspiration was for command-line argument processing, but it can be used for any other purpose.
for license details.
The copyright to this program is held by it's authors.
Field Summary | |
---|---|
private ArgumentType |
argumentType
|
private DataType |
dataType
|
private String |
defaultValue
|
private String |
description
|
private String |
longName
|
private char |
shortName
|
Constructor Summary | |
---|---|
Option(String description,
ArgumentType argumentType,
DataType dataType,
char shortName)
Create an Option with a short name, having no default value. |
|
Option(String description,
ArgumentType argumentType,
DataType dataType,
char shortName,
String longName)
Create an Option with both short and long names, having no default value. |
|
Option(String description,
ArgumentType argumentType,
DataType dataType,
char shortName,
String longName,
String defaultValue)
Create an Option with both short and long names of a given DataType having a default value. |
|
Option(String description,
ArgumentType argumentType,
DataType dataType,
String longName)
Create an Option with a long name, having no default value. |
|
Option(String description,
char shortName)
Create a BOOLEAN Option with a short name, having no default value. |
|
Option(String description,
char shortName,
String longName)
Create a BOOLEAN Option with both short and long names, having no default value. |
|
Option(String description,
char shortName,
String longName,
String defaultValue)
Create an Option with both short and long names of a given DataType having a default value. |
|
Option(String description,
String longName)
Create a BOOLEAN Option with a long name, having no default value. |
Method Summary | |
---|---|
ArgumentType |
getArgumentType()
The ArgumentType indicates this Option's ability to use a following argument. |
DataType |
getDataType()
|
String |
getDefaultValue()
|
String |
getDescription()
The description provides a brief explanation of the option. |
String |
getLongName()
The long name of an Option is the single character by which this Option is known. |
char |
getShortName()
The short name of an Option is the single character by which this Option is known. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private String description
private char shortName
private String longName
private DataType dataType
private ArgumentType argumentType
private String defaultValue
Constructor Detail |
---|
public Option(String description, char shortName)
description
- the descriptionshortName
- the short namepublic Option(String description, String longName)
description
- the descriptionlongName
- the long namepublic Option(String description, char shortName, String longName)
description
- the descriptionshortName
- the short namelongName
- the long namepublic Option(String description, char shortName, String longName, String defaultValue)
description
- the descriptionshortName
- the short namelongName
- the long namedefaultValue
- the default value for this Optionpublic Option(String description, ArgumentType argumentType, DataType dataType, char shortName)
description
- the descriptionargumentType
- the type of the argumentdataType
- the type of argument's datashortName
- the short namepublic Option(String description, ArgumentType argumentType, DataType dataType, String longName)
description
- the descriptionargumentType
- the type of the argumentdataType
- the type of argument's datalongName
- the long namepublic Option(String description, ArgumentType argumentType, DataType dataType, char shortName, String longName)
description
- the descriptionargumentType
- the type of the argumentdataType
- the type of argument's datashortName
- the short namelongName
- the long namepublic Option(String description, ArgumentType argumentType, DataType dataType, char shortName, String longName, String defaultValue)
description
- the descriptionargumentType
- the type of the argumentdataType
- the type of argument's datashortName
- the short namelongName
- the long namedefaultValue
- the default value for this OptionMethod Detail |
---|
public String getDescription()
public char getShortName()
public String getLongName()
public ArgumentType getArgumentType()
public DataType getDataType()
public String getDefaultValue()
|
Copyright ? 2003-2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |