|
|||||||||
| 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.io.File>
net.sf.freecol.common.option.FileOption
public class FileOption
Represents an option for specifying a File.
| Field Summary | |
|---|---|
private static java.util.logging.Logger |
logger
|
private java.io.File |
value
|
| Fields inherited from class net.sf.freecol.common.option.AbstractOption |
|---|
isDefined |
| 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 | |
|---|---|
FileOption(Specification specification)
Creates a new FileOption. |
|
| Method Summary | |
|---|---|
FileOption |
clone()
|
java.io.File |
getValue()
Gets the current value of this FileOption. |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
boolean |
isNullValueOK()
Returns whether null is an acceptable value for
this Option. |
void |
setValue(java.io.File value)
Sets the value of this FileOption. |
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 |
|---|
generateChoices, getGroup, readAttributes, readFromXMLImpl, readOption, setGroup, setValues |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.freecol.common.option.Option |
|---|
getId, readFromXML, toString, toXML |
| Field Detail |
|---|
private static java.util.logging.Logger logger
private java.io.File value
| Constructor Detail |
|---|
public FileOption(Specification specification)
FileOption.
specification - The specification this option belongs
to. May be null.| Method Detail |
|---|
public FileOption clone()
clone in interface Option<java.io.File>clone in class AbstractOption<java.io.File>public java.io.File getValue()
FileOption.
getValue in interface Option<java.io.File>getValue in class AbstractOption<java.io.File>null for marking no value.public void setValue(java.io.File value)
FileOption.
setValue in interface Option<java.io.File>setValue in class AbstractOption<java.io.File>value - The value to be set.
protected void setValue(java.lang.String valueString,
java.lang.String defaultValueString)
AbstractOption
setValue in class AbstractOption<java.io.File>valueString - the string representation of the value of
this OptiondefaultValueString - the string representation of the
default value of this Optionpublic boolean isNullValueOK()
null is an acceptable value for
this Option. This method always returns true.
isNullValueOK in class AbstractOption<java.io.File>
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 | ||||||||