cdx.scorebot.util.config
Class ConfigString
java.lang.Object
cdx.scorebot.util.config.ConfigOption<java.lang.String>
cdx.scorebot.util.config.ConfigString
- All Implemented Interfaces:
- java.io.Serializable
public class ConfigString
- extends ConfigOption<java.lang.String>
- implements java.io.Serializable
Implements String as a configuration option
- Author:
- David Underhill
- See Also:
- Serialized Form
Constructor Summary |
ConfigString(java.lang.String option)
Instantiates a ConfigOption with no restricted values (c should not be MULTI) |
ConfigString(java.lang.String option,
java.lang.String[] possValues)
Instantiates a ConfigOption with specified allowed values (c should be MULTI) |
Method Summary |
java.util.Vector<java.lang.String> |
getAllowedValuesCopy()
gets a COPY of the possible values this component may take on (only used
if ComponType is MULTI). |
ConfigOption |
getShortCopy()
Returns a copy of this configuration option. |
Methods inherited from class cdx.scorebot.util.config.ConfigOption |
addValue, equals, getComponType, getCurrentValue, getCurrentValueIndex, getName, getType, getValue, getValues, getVarianceType, nextValue, removeValue, setCurrentValue, setName, setVarianceType, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ConfigString
public ConfigString(java.lang.String option)
- Instantiates a ConfigOption with no restricted values (c should not be MULTI)
- Parameters:
option
- initial value of the option
ConfigString
public ConfigString(java.lang.String option,
java.lang.String[] possValues)
- Instantiates a ConfigOption with specified allowed values (c should be MULTI)
- Parameters:
option
- initial value of the optionpossValues
- what kind of values a component will need to work with for this option
getAllowedValuesCopy
public java.util.Vector<java.lang.String> getAllowedValuesCopy()
- gets a COPY of the possible values this component may take on (only used
if ComponType is MULTI).
- Specified by:
getAllowedValuesCopy
in class ConfigOption<java.lang.String>
- Returns:
- COPY of the possible values the component may take on if it is of type MULTI
getShortCopy
public ConfigOption getShortCopy()
- Description copied from class:
ConfigOption
- Returns a copy of this configuration option. The copy will only contain
the current value as returned by getOption. None of the "allowed values"
other than the currently selected value will be included in this copy. A
reference to the current possible values will be included since they are
read-only.
- Specified by:
getShortCopy
in class ConfigOption<java.lang.String>
- Returns:
- a deep copy of this ConfigOption which only contains the current value