cdx.scorebot.util.config
Class ConfigString

java.lang.Object
  extended by cdx.scorebot.util.config.ConfigOption<java.lang.String>
      extended by 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

Field Summary
 
Fields inherited from class cdx.scorebot.util.config.ConfigOption
possValues
 
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
 

Constructor Detail

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 option
possValues - what kind of values a component will need to work with for this option
Method Detail

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