|
|||||||||
| 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
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, NO_ID, previewEnabled |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE |
| 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. |
protected void |
readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
Initialize this object from an XML-representation of this object. |
void |
setValue(boolean value)
Sets the current value of this BooleanOption. |
protected void |
toXMLImpl(javax.xml.stream.XMLStreamWriter out)
This method writes an XML-representation of this object to the given stream. |
| Methods inherited from class net.sf.freecol.common.option.AbstractOption |
|---|
getGroup, getName, getShortDescription, isPreviewEnabled, setGroup, setPreviewEnabled, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface net.sf.freecol.common.option.Option |
|---|
addPropertyChangeListener, getId, readFromXML, readFromXMLElement, removePropertyChangeListener, toXML, toXMLElement |
| Field Detail |
|---|
private static java.util.logging.Logger logger
private boolean value
| Constructor Detail |
|---|
public BooleanOption(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
BooleanOption.
in - The XMLStreamReader containing the data.
javax.xml.stream.XMLStreamException| Method Detail |
|---|
public boolean getValue()
BooleanOption.
public void setValue(boolean value)
BooleanOption.
value - The value.
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 readFromXMLImpl(javax.xml.stream.XMLStreamReader in)
throws javax.xml.stream.XMLStreamException
readFromXMLImpl in class FreeColObjectin - The input stream with the XML.
javax.xml.stream.XMLStreamException - if a problem was encountered
during parsing.public static java.lang.String getXMLElementTagName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||