|
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.OptionContainer
public class OptionContainer
An option container stores the option values for one instance usage. For example, a single malt configuration there will only be one option container, but for an ensemble parser there could be several option containers. There are four types internal option container:
These internal option containers have following priority: SAVEDOPTION, DEPENDENCIES_RESOLVED, COMMANDLINE, OPTIONFILE. If an option cannot be found in the SAVEDOPTION internal option container it will continue to look in the DEPENDENCIES_RESOLVED internal option container and and so fourth. If the option value cannot be found in none of the internal option container, the option manager uses the default option value provided by the option description.
Field Summary | |
---|---|
static int |
COMMANDLINE
|
static int |
DEPENDENCIES_RESOLVED
|
static int |
OPTIONFILE
|
static int |
SAVEDOPTION
|
Constructor Summary | |
---|---|
OptionContainer(int index)
Creates an option container |
Method Summary | |
---|---|
void |
addOptionValue(int type,
Option option,
Object value)
Adds an option value to an option to one of the internal option container specified by the type. |
int |
compareTo(OptionContainer that)
|
boolean |
contains(int type,
Option option)
Returns true if the option is present in the specified internal option container, otherwise false. |
int |
getIndex()
Returns the option container index. |
int |
getNumberOfOptionValues()
Returns the number of option values amongst all internal option containers. |
Object |
getOptionValue(Option option)
Returns the option value object for the option. |
String |
getOptionValueString(Option option)
Returns a string representation of the option value for the specified 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 SAVEDOPTION
public static final int DEPENDENCIES_RESOLVED
public static final int COMMANDLINE
public static final int OPTIONFILE
Constructor Detail |
---|
public OptionContainer(int index) throws OptionException
index
- The index of the option container (0..n).
OptionException
Method Detail |
---|
public void addOptionValue(int type, Option option, Object value) throws OptionException
type
- the internal option containeroption
- the option objectvalue
- the option value object
OptionException
public Object getOptionValue(Option option)
option
- the option object
public String getOptionValueString(Option option)
option
- the option object
public boolean contains(int type, Option option) throws OptionException
type
- the internal option containeroption
- the option object
OptionException
public int getNumberOfOptionValues()
public int getIndex()
public int compareTo(OptionContainer that)
compareTo
in interface Comparable<OptionContainer>
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 |