net.sf.freecol.common.option
Class BooleanOption
java.lang.Object
net.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.option.AbstractOption
net.sf.freecol.common.option.BooleanOption
- All Implemented Interfaces:
- Option
public class BooleanOption
- extends AbstractOption
Represents an option that can be either true
or false.
Constructor Summary |
BooleanOption(javax.xml.stream.XMLStreamReader in)
Creates a new BooleanOption . |
Method Summary |
boolean |
getValue()
Gets the current value of this BooleanOption . |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
void |
setValue(boolean value)
Sets the current value of this BooleanOption . |
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 |
BooleanOption
public BooleanOption(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
- Creates a new
BooleanOption
.
- Parameters:
in
- The XMLStreamReader
containing the data.
- Throws:
javax.xml.stream.XMLStreamException
getValue
public boolean getValue()
- Gets the current value of this
BooleanOption
.
- Returns:
- The value.
setValue
public void setValue(boolean value)
- Sets the current value of this
BooleanOption
.
- Parameters:
value
- The value.
getXMLElementTagName
public static java.lang.String getXMLElementTagName()
- Gets the tag name of the root element representing this object.
- Returns:
- "booleanOption".