net.sf.freecol.common.option
Class StringOption

java.lang.Object
  extended by net.sf.freecol.common.model.FreeColObject
      extended by net.sf.freecol.common.option.AbstractOption
          extended by net.sf.freecol.common.option.StringOption
All Implemented Interfaces:
Option

public class StringOption
extends AbstractOption

Represents an option that can be either true or false.


Field Summary
 
Fields inherited from class net.sf.freecol.common.option.AbstractOption
NO_ID
 
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ID_ATTRIBUTE_TAG
 
Constructor Summary
StringOption(javax.xml.stream.XMLStreamReader in)
          Creates a new StringOption.
 
Method Summary
 java.lang.String getValue()
          Gets the current value of this StringOption.
static java.lang.String getXMLElementTagName()
          Gets the tag name of the root element representing this object.
 void setValue(java.lang.String value)
          Sets the current value of this StringOption.
 
Methods inherited from class net.sf.freecol.common.option.AbstractOption
getGroup, getName, getShortDescription, isPreviewEnabled, setGroup, setPreviewEnabled, toString
 
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addPropertyChangeListener, addPropertyChangeListener, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAttribute, getAttribute, getAttribute, getAttribute, getId, getPropertyChangeListeners, getPropertyChangeListeners, hasAbility, hasAttribute, hasListeners, readFromXML, readFromXMLElement, removePropertyChangeListener, removePropertyChangeListener, toXML, toXML, toXML, toXMLElement, toXMLElement, toXMLElement, toXMLElement, toXMLElementPartial, writeAttribute, writeFreeColGameObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface net.sf.freecol.common.option.Option
addPropertyChangeListener, getId, readFromXML, readFromXMLElement, removePropertyChangeListener, toXML, toXMLElement
 

Constructor Detail

StringOption

public StringOption(javax.xml.stream.XMLStreamReader in)
             throws javax.xml.stream.XMLStreamException
Creates a new StringOption.

Parameters:
in - The XMLStreamReader containing the data.
Throws:
javax.xml.stream.XMLStreamException
Method Detail

getValue

public java.lang.String getValue()
Gets the current value of this StringOption.

Returns:
The value.

setValue

public void setValue(java.lang.String value)
Sets the current value of this StringOption.

Parameters:
value - The value.

getXMLElementTagName

public static java.lang.String getXMLElementTagName()
Gets the tag name of the root element representing this object.

Returns:
"StringOption".