|
||||||||||
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.IntegerOption
public class IntegerOption
Represents an option where the valid choice is an integer.
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 | |
---|---|
IntegerOption(java.lang.String id,
OptionGroup optionGroup,
int minimumValue,
int maximumValue,
int defaultValue)
Deprecated. |
|
IntegerOption(javax.xml.stream.XMLStreamReader in)
Creates a new IntegerOption . |
Method Summary | |
---|---|
int |
getMaximumValue()
Returns the maximum allowed value. |
int |
getMinimumValue()
Returns the minimum allowed value. |
int |
getValue()
Gets the current value of this IntegerOption . |
static java.lang.String |
getXMLElementTagName()
Gets the tag name of the root element representing this object. |
void |
setValue(int value)
Sets the value of this IntegerOption . |
Methods inherited from class net.sf.freecol.common.option.AbstractOption |
---|
getGroup, getName, getShortDescription, isPreviewEnabled, setGroup, setPreviewEnabled, toString |
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 |
---|
public IntegerOption(java.lang.String id, OptionGroup optionGroup, int minimumValue, int maximumValue, int defaultValue)
IntegerOption
.
id
- The identifier for this option. This is used when the object should be
found in an OptionGroup
.optionGroup
- The OptionGroup this option belongs to.minimumValue
- The minimum allowed value.maximumValue
- The maximum allowed value.defaultValue
- The default value of this option.public IntegerOption(javax.xml.stream.XMLStreamReader in) throws javax.xml.stream.XMLStreamException
IntegerOption
.
in
- The XMLStreamReader
containing the data.
javax.xml.stream.XMLStreamException
Method Detail |
---|
public int getMinimumValue()
public int getMaximumValue()
public int getValue()
IntegerOption
.
public void setValue(int value)
IntegerOption
.
value
- The value to be set.public static java.lang.String getXMLElementTagName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |