|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.utilities.optionhandling.Option<Boolean>
de.lmu.ifi.dbs.elki.utilities.optionhandling.Flag
public class Flag
Option class specifying a flag object.
A flag object is optional parameter which can be set (value "true") or not (value "false").
Field Summary | |
---|---|
static String |
NOT_SET
Constant indicating that the flag is not set. |
static String |
SET
Constant indicating that the flag is set. |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option |
---|
optionid, shortDescription, value |
Constructor Summary | |
---|---|
Flag(OptionID optionID)
Constructs a flag object with the given optionID. |
Method Summary | |
---|---|
String |
getFullDescription()
Returns the short description of this flag. |
String |
getSyntax()
A flag has no syntax, since it doesn't take extra options |
boolean |
isSet()
Returns true if the flag is set, false otherwise. |
boolean |
isValid(String value)
Checks if the given argument is valid for this option. |
void |
setValue(boolean value)
Specifies if the flag is set or not. |
void |
setValue(String value)
Specifies if the flag is set or not. |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.Option |
---|
getName, getOptionID, getShortDescription, getValue, setShortDescription |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String SET
public static final String NOT_SET
Constructor Detail |
---|
public Flag(OptionID optionID)
optionID
- the unique id of the optionMethod Detail |
---|
public String getFullDescription()
getFullDescription
in class Option<Boolean>
public boolean isSet()
isSet
in class Option<Boolean>
public void setValue(String value) throws ParameterException
SET
or NOT_SET
.
setValue
in class Option<Boolean>
value
- the option's value to be set
ParameterException
- if the given value is not a valid value for this option.public void setValue(boolean value)
value
- true, if the flag is set, false otherwisepublic boolean isValid(String value) throws ParameterException
Option
isValid
in class Option<Boolean>
value
- option value to be checked
ParameterException
- if the given value is not a valid value for this option.public String getSyntax()
getSyntax
in class Option<Boolean>
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |