Package net.sf.freecol.common.option
Class UnitListOption
- java.lang.Object
-
- net.sf.freecol.common.model.FreeColObject
-
- net.sf.freecol.common.model.FreeColSpecObject
-
- net.sf.freecol.common.option.AbstractOption<java.util.List<AbstractOption<T>>>
-
- net.sf.freecol.common.option.ListOption<AbstractUnit>
-
- net.sf.freecol.common.option.UnitListOption
-
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.Comparable<FreeColObject>,ObjectWithId,Option<java.util.List<AbstractOption<AbstractUnit>>>
public class UnitListOption extends ListOption<AbstractUnit>
Represents an option where the valid choice is a list of AbstractUnits, e.g. the units of the REF.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTAG-
Fields inherited from class net.sf.freecol.common.option.ListOption
allowDuplicates
-
Fields inherited from class net.sf.freecol.common.option.AbstractOption
ACTION_TAG, DEFAULT_VALUE_TAG, isDefined
-
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ARRAY_SIZE_TAG, DEFAULT_CLASS_INDEX, fcoComparator, ID_ATTRIBUTE_TAG, PARTIAL_ATTRIBUTE_TAG, VALUE_TAG
-
-
Constructor Summary
Constructors Constructor Description UnitListOption(java.lang.String id, Specification specification)Creates a newUnitListOption.UnitListOption(Specification specification)Creates a newUnitListOption.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UnitListOptioncloneOption()Clone this option.java.lang.StringgetXMLTagName()Get the serialization tag for this object.-
Methods inherited from class net.sf.freecol.common.option.ListOption
canAdd, getAllowDuplicates, getMaximumNumber, getOptionValues, getTemplate, getValue, isNullValueOK, readAttributes, readChild, readChildren, setAllowDuplicates, setListValues, setMaximumNumber, setTemplate, setValue, toString, writeAttributes, writeChildren
-
Methods inherited from class net.sf.freecol.common.option.AbstractOption
generateChoices, getEnabledBy, getGroup, readOption, setGroup, setValue, setValues
-
Methods inherited from class net.sf.freecol.common.model.FreeColSpecObject
copyIn, getSpecification, setSpecification
-
Methods inherited from class net.sf.freecol.common.model.FreeColObject
addAbility, addFeatures, addModifier, addPropertyChangeListener, addPropertyChangeListener, apply, apply, applyModifiers, applyModifiers, arrayKey, compareIds, compareTo, containsAbilityKey, containsModifierKey, copy, copy, copy, copy, copyInCast, dumpObject, equals, fireIndexedPropertyChange, fireIndexedPropertyChange, fireIndexedPropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAbilities, getAbilities, getAbilities, getAbilities, getClassIndex, getDefenceModifiers, getDisplayObject, getFeatureContainer, getFreeColObjectClass, getFreeColObjectClassByName, getGame, getId, getIdNumber, getIdType, getIdTypeByName, getModifiers, getModifiers, getModifiers, getModifiers, getObjectClassIndex, getPropertyChangeListeners, getPropertyChangeListeners, getPropertyChangeSupport, getSortedAbilities, getSortedModifiers, getSuffix, getSuffix, hasAbility, hasAbility, hasAbility, hashCode, hasListeners, hasModifier, hasModifier, hasModifier, idEquals, invokeMethod, logFreeColObjects, readFromXML, readFromXMLPartial, removeAbilities, removeAbility, removeFeatures, removeModifier, removeModifiers, removePropertyChangeListener, removePropertyChangeListener, save, save, save, save, serialize, serialize, serialize, serialize, setGame, setId, toXML, toXML, toXMLPartial, toXMLPartial
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.freecol.common.ObjectWithId
getId
-
Methods inherited from interface net.sf.freecol.common.option.Option
readFromXML, toXML
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
UnitListOption
public UnitListOption(Specification specification)
Creates a newUnitListOption.- Parameters:
specification- TheSpecificationto refer to.
-
UnitListOption
public UnitListOption(java.lang.String id, Specification specification)Creates a newUnitListOption.- Parameters:
id- The object identifier.specification- TheSpecificationto refer to.
-
-
Method Detail
-
cloneOption
public UnitListOption cloneOption()
Clone this option.- Specified by:
cloneOptionin interfaceOption<java.util.List<AbstractOption<AbstractUnit>>>- Specified by:
cloneOptionin classAbstractOption<java.util.List<AbstractOption<AbstractUnit>>>- Returns:
- A clone of this option.
-
getXMLTagName
public java.lang.String getXMLTagName()
Get the serialization tag for this object.- Specified by:
getXMLTagNamein classFreeColObject- Returns:
- The tag.
-
-