|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.common.model.FreeColObject
net.sf.freecol.common.option.AbstractOption<java.lang.Boolean>
net.sf.freecol.common.option.BooleanOption
public class BooleanOption
Represents an option that can be either true or false.
| Field Summary | |
|---|---|
private static java.util.logging.Logger |
logger
|
private boolean |
value
|
| Fields inherited from class net.sf.freecol.common.option.AbstractOption |
|---|
isDefined, previewEnabled |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, INFINITY, NO_ID, PARTIAL_ATTRIBUTE, UNDEFINED, VALUE_TAG |
| Constructor Summary | |
|---|---|
BooleanOption(java.lang.String id)
Creates a new BooleanOption. |
|
BooleanOption(javax.xml.stream.XMLStreamReader in)
Creates a new BooleanOption. |
|
| Method Summary | |
|---|---|
java.lang.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(java.lang.Boolean value)
Sets the current value of this BooleanOption. |
protected void |
setValue(java.lang.String valueString,
java.lang.String defaultValueString)
Sets the value of this Option from the given string representation. |
protected void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
protected void |
writeAttributes(javax.xml.stream.XMLStreamWriter out)
Write the attributes of this object to a stream. |
| Methods inherited from class net.sf.freecol.common.option.AbstractOption |
|---|
getGroup, isPreviewEnabled, readAttributes, readFromXMLImpl, setGroup, setPreviewEnabled |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.freecol.common.option.Option |
|---|
addPropertyChangeListener, getId, readFromXML, readFromXMLElement, removePropertyChangeListener, toString, toXML, toXMLElement |
| Field Detail |
|---|
private static java.util.logging.Logger logger
private boolean value
| Constructor Detail |
|---|
public BooleanOption(java.lang.String id)
BooleanOption.
id - The identifier for this option. This is used when the object
should be found in an OptionGroup.
public BooleanOption(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
BooleanOption.
in - The XMLStreamReader containing the data.
javax.xml.stream.XMLStreamException - if an error occurs| Method Detail |
|---|
public java.lang.Boolean getValue()
BooleanOption.
getValue in class AbstractOption<java.lang.Boolean>public void setValue(java.lang.Boolean value)
BooleanOption.
setValue in class AbstractOption<java.lang.Boolean>value - The value.
protected void setValue(java.lang.String valueString,
java.lang.String defaultValueString)
setValue in class AbstractOption<java.lang.Boolean>valueString - the string representation of the value of
this OptiondefaultValueString - the string representation of the
default value of this Option
protected void toXMLImpl(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
toXMLImpl in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing
to the stream.
protected void writeAttributes(javax.xml.stream.XMLStreamWriter out)
throws javax.xml.stream.XMLStreamException
writeAttributes in class FreeColObjectout - The target stream.
javax.xml.stream.XMLStreamException - if there are any problems writing to
the stream.public static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||