|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.maltparser.core.options.option.Option
public abstract class Option
Abstract class that contains description of an option that are the same over all option types.
Field Summary | |
---|---|
static int |
BOTH
The option is relevant both during learning and processing (parsing) |
static int |
NONE
|
static int |
PROCESS
The option is only relevant during processing (parsing) |
static int |
SAVE
The option is saved during learning and cannot be overloaded during processing (parsing) |
static int |
TRAIN
The option is only relevant during learning |
Constructor Summary | |
---|---|
Option(OptionGroup group,
String name,
String shortDescription,
String flag,
String usage)
Creates an option description |
Method Summary | |
---|---|
int |
compareTo(Option o)
|
abstract Object |
getDefaultValueObject()
Returns the object for the default value for option. |
abstract String |
getDefaultValueString()
Returns a string representation of the default value. |
String |
getFlag()
Returns a character that is used as a flag for the command line input |
OptionGroup |
getGroup()
Returns a reference to a option group. |
String |
getName()
Returns the name of the option. |
String |
getShortDescription()
Returns a short description of the option |
abstract String |
getStringRepresentation(Object value)
Returns a string representation of the option value. |
int |
getUsage()
Returns the usage of the option. |
abstract Object |
getValueObject(String value)
Returns the corresponding object for the option value (specified as a string value). |
boolean |
isAmbiguous()
Returns true if the option name is ambiguous over all option groups, otherwise false. |
void |
setAmbiguous(boolean ambiguous)
Sets true if the option name is ambiguous over all option groups, otherwise false. |
abstract void |
setDefaultValue(String defaultValue)
Sets the default value for the option. |
void |
setFlag(String flag)
Sets a character that is used as a flag for the command line input |
void |
setGroup(OptionGroup group)
Sets the reference to the option group |
void |
setName(String name)
Sets the name of the option. |
void |
setShortDescription(String shortDescription)
Sets a short description of the option |
void |
setUsage(int usage)
Sets the usage of the option. |
void |
setUsage(String usage)
Sets the usage of the option. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int NONE
public static final int TRAIN
public static final int PROCESS
public static final int BOTH
public static final int SAVE
Constructor Detail |
---|
public Option(OptionGroup group, String name, String shortDescription, String flag, String usage) throws MaltChainedException
group
- a reference to the option group.name
- the name of the option.shortDescription
- a short description of the option.flag
- a flag that can be used in the command line.usage
- a string that explains the usage of the option.
OptionException
MaltChainedException
Method Detail |
---|
public abstract Object getValueObject(String value) throws MaltChainedException
value
- the string option value
OptionException
MaltChainedException
public abstract Object getDefaultValueObject() throws MaltChainedException
OptionException
MaltChainedException
public abstract String getDefaultValueString()
public abstract void setDefaultValue(String defaultValue) throws MaltChainedException
defaultValue
- the string default value
OptionException
MaltChainedException
public abstract String getStringRepresentation(Object value)
value
- an option value object
public OptionGroup getGroup()
public void setGroup(OptionGroup group)
group
- a reference to a option grouppublic String getName()
public void setName(String name) throws MaltChainedException
name
- the name of the option.
OptionException
MaltChainedException
public String getShortDescription()
public void setShortDescription(String shortDescription)
shortDescription
- a short description of the optionpublic String getFlag()
public void setFlag(String flag) throws MaltChainedException
flag
- a character that is used as a flag for the command line input
OptionException
MaltChainedException
public int getUsage()
public void setUsage(String usage) throws MaltChainedException
usage
- the usage of the option.
OptionException
MaltChainedException
public void setUsage(int usage) throws MaltChainedException
usage
- the usage of the option.
OptionException
MaltChainedException
public boolean isAmbiguous()
public void setAmbiguous(boolean ambiguous)
ambiguous
- true if the option name is ambiguous over all option groups, otherwise false.public int compareTo(Option o)
compareTo
in interface Comparable<Option>
public String toString()
toString
in class Object
|
MaltParser 1.4.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |