Package net.sf.freecol.common.model
Class Modifier
- java.lang.Object
-
- net.sf.freecol.common.model.FreeColObject
-
- net.sf.freecol.common.model.FreeColSpecObject
-
- net.sf.freecol.common.model.Feature
-
- net.sf.freecol.common.model.Modifier
-
- All Implemented Interfaces:
java.lang.Comparable<FreeColObject>
,Named
,ObjectWithId
public class Modifier extends Feature
TheModifier
class encapsulates a bonus or penalty that can be applied to any action within the game, most obviously combat. The Modifier may be applicable only to certain Objects specified by means ofScope
objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Modifier.ModifierType
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
AMPHIBIOUS_ATTACK
static java.lang.String
ARTILLERY_AGAINST_RAID
static java.lang.String
ARTILLERY_IN_THE_OPEN
static java.util.Comparator<Modifier>
ascendingModifierIndexComparator
Comparator to sort by ascending modifier index, then type, then source, then FCO order.static java.lang.String
ATTACK_BONUS
static int
AUTO_PRODUCTION_INDEX
static int
BASE_COMBAT_INDEX
static java.lang.String
BIG_MOVEMENT_PENALTY
static java.lang.String
BOMBARD_BONUS
static java.lang.String
BREEDING_DIVISOR
static java.lang.String
BREEDING_FACTOR
static java.lang.String
BUILDING_PRICE_BONUS
static int
BUILDING_PRODUCTION_INDEX
static java.lang.String
CARGO_PENALTY
static java.lang.String
COLONY_GOODS_PARTY
static int
COLONY_PRODUCTION_INDEX
static java.lang.String
CONSUME_ONLY_SURPLUS_PRODUCTION
static java.lang.String
CONVERSION_ALARM_RATE
static java.lang.String
CONVERSION_SKILL
static int
DEFAULT_MODIFIER_INDEX
static int
DEFAULT_PRODUCTION_INDEX
static java.lang.String
DEFENCE
static int
DISASTER_PRODUCTION_INDEX
static int
EXPERT_PRODUCTION_INDEX
static java.lang.String
EXPLORE_LOST_CITY_RUMOUR
static java.lang.String
EXPOSED_TILES_RADIUS
static int
FATHER_PRODUCTION_INDEX
static java.lang.String
FORTIFIED
static int
GENERAL_COMBAT_INDEX
static java.lang.String
IMMIGRATION
static int
IMPROVEMENT_PRODUCTION_INDEX
private float
increment
The value increments per turn.private static java.lang.String
INCREMENT_TAG
private static java.lang.String
INCREMENT_TYPE_TAG
private Modifier.ModifierType
incrementType
The type of increment.private static java.lang.String
INDEX_TAG
static java.lang.String
LAND_PAYMENT_MODIFIER
static java.lang.String
LIBERTY
static java.lang.String
LINE_OF_SIGHT_BONUS
static java.lang.String
MINIMUM_COLONY_SIZE
static java.lang.String
MISSIONARY_TRADE_BONUS
private int
modifierIndex
A sorting index.private Modifier.ModifierType
modifierType
The type of this Modifier.static java.lang.String
MOVEMENT_BONUS
static int
NATION_PRODUCTION_INDEX
static java.lang.String
NATIVE_ALARM_MODIFIER
static java.lang.String
NATIVE_CONVERT_BONUS
static java.lang.String
OFFENCE
static java.lang.String
OFFENCE_AGAINST
private static java.lang.String
OLD_INCREMENT_TYPE_TAG
static int
PARTY_PRODUCTION_INDEX
static java.lang.String
PEACE_TREATY
static java.lang.String
POPULAR_SUPPORT
static java.lang.String
RELIGIOUS_UNREST_BONUS
static int
RESOURCE_PRODUCTION_INDEX
static int
ROLE_COMBAT_INDEX
static java.lang.String
SAIL_HIGH_SEAS
static java.lang.String
SHIP_TRADE_PENALTY
static java.lang.String
SMALL_MOVEMENT_PENALTY
static java.lang.String
SOL
static java.lang.String
TAG
static java.lang.String
TILE_TYPE_CHANGE_PRODUCTION
static java.lang.String
TRADE_BONUS
static java.lang.String
TRADE_VOLUME_PENALTY
static java.lang.String
TREASURE_TRANSPORT_FEE
private static java.lang.String
TYPE_TAG
static int
UNIT_ADDITIVE_COMBAT_INDEX
static int
UNIT_NORMAL_COMBAT_INDEX
static float
UNKNOWN
private float
value
The value of this Modifier.static java.lang.String
WAREHOUSE_STORAGE
-
Fields inherited from class net.sf.freecol.common.model.FreeColObject
ARRAY_SIZE_TAG, DEFAULT_CLASS_INDEX, fcoComparator, ID_ATTRIBUTE_TAG, logger, PARTIAL_ATTRIBUTE_TAG, VALUE_TAG
-
-
Constructor Summary
Constructors Constructor Description Modifier(java.lang.String id, float value, Modifier.ModifierType type)
Creates a newModifier
instance.Modifier(java.lang.String id, float value, Modifier.ModifierType type, FreeColObject source)
Creates a newModifier
instance.Modifier(java.lang.String id, float value, Modifier.ModifierType type, FreeColObject source, int modifierIndex)
Creates a newModifier
instance.Modifier(FreeColXMLReader xr, Specification specification)
Creates a newModifier
instance.Modifier(Specification specification)
Deliberately empty constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description float
apply(float base, float value)
Applies the given value to the given base value, depending on the type of this Modifier.private float
apply(float base, float value, Modifier.ModifierType type)
Applies the given value to the given base value, depending on the give modifier Type.float
applyTo(float number)
Applies this Modifier to a number.float
applyTo(float number, Turn turn)
Applies this Modifier to a number.<T extends FreeColObject>
booleancopyIn(T other)
Copy another FreeColObject into this one if it is compatible.boolean
equals(java.lang.Object o)
float
getIncrement()
Get the increment value.Modifier.ModifierType
getIncrementType()
Get the increment type.int
getModifierIndex()
Get the modifier index.Modifier.ModifierType
getType()
Get the modifier type.float
getValue()
Get the modifier value.float
getValue(Turn turn)
Get the value the modifier during the given Turn.java.lang.String
getXMLTagName()
Get the serialization tag for this object.int
hashCode()
boolean
hasIncrement()
Does this modifier have an increment?static boolean
isFloatKnown(float value)
Is this a "known" value.boolean
isKnown()
Does this modifier have a known value? That is, is it not set to the UNKNOWN value.static Modifier
makeModifier(Modifier modifier)
Make a copy of a modifier.static Modifier
makeTimedModifier(java.lang.String id, Modifier template, Turn start)
Makes a timed modifier (one with start/end turn and increment) with the specified identifier from a template modifier (containing the increment and value) and given start turn.protected void
readAttributes(FreeColXMLReader xr)
Reads the attributes of this object from an XML stream.Modifier
setIncrement(float increment)
Set the increment value.Modifier
setIncrement(Modifier.ModifierType incrementType, float increment, Turn firstTurn, Turn lastTurn)
Set the whole increment.Modifier
setIncrementType(Modifier.ModifierType incrementType)
Set the increment type.Modifier
setModifierIndex(int modifierIndex)
Set the modifier index.Modifier
setType(Modifier.ModifierType modifierType)
Set the modifier type.Modifier
setValue(float value)
Set the modifier value.java.lang.String
toString()
protected void
writeAttributes(FreeColXMLWriter xw)
Write the attributes of this object to a stream.-
Methods inherited from class net.sf.freecol.common.model.Feature
addScope, appliesTo, appliesTo, appliesTo, copyScopes, getDuration, getFirstTurn, getLastTurn, getNameKey, getScopeList, getScopes, getSource, hasScope, hasTimeLimit, isIndependent, isOutOfDate, isTemporary, readChild, readChildren, setDuration, setFirstTurn, setLastTurn, setSource, setTemporary, writeChildren
-
Methods inherited from class net.sf.freecol.common.model.FreeColSpecObject
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, 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, 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
-
-
-
-
Field Detail
-
TAG
public static final java.lang.String TAG
- See Also:
- Constant Field Values
-
ascendingModifierIndexComparator
public static final java.util.Comparator<Modifier> ascendingModifierIndexComparator
Comparator to sort by ascending modifier index, then type, then source, then FCO order.
-
AMPHIBIOUS_ATTACK
public static final java.lang.String AMPHIBIOUS_ATTACK
- See Also:
- Constant Field Values
-
ARTILLERY_AGAINST_RAID
public static final java.lang.String ARTILLERY_AGAINST_RAID
- See Also:
- Constant Field Values
-
ARTILLERY_IN_THE_OPEN
public static final java.lang.String ARTILLERY_IN_THE_OPEN
- See Also:
- Constant Field Values
-
ATTACK_BONUS
public static final java.lang.String ATTACK_BONUS
- See Also:
- Constant Field Values
-
BIG_MOVEMENT_PENALTY
public static final java.lang.String BIG_MOVEMENT_PENALTY
- See Also:
- Constant Field Values
-
BOMBARD_BONUS
public static final java.lang.String BOMBARD_BONUS
- See Also:
- Constant Field Values
-
BREEDING_DIVISOR
public static final java.lang.String BREEDING_DIVISOR
- See Also:
- Constant Field Values
-
BREEDING_FACTOR
public static final java.lang.String BREEDING_FACTOR
- See Also:
- Constant Field Values
-
BUILDING_PRICE_BONUS
public static final java.lang.String BUILDING_PRICE_BONUS
- See Also:
- Constant Field Values
-
CARGO_PENALTY
public static final java.lang.String CARGO_PENALTY
- See Also:
- Constant Field Values
-
COLONY_GOODS_PARTY
public static final java.lang.String COLONY_GOODS_PARTY
- See Also:
- Constant Field Values
-
CONSUME_ONLY_SURPLUS_PRODUCTION
public static final java.lang.String CONSUME_ONLY_SURPLUS_PRODUCTION
- See Also:
- Constant Field Values
-
CONVERSION_ALARM_RATE
public static final java.lang.String CONVERSION_ALARM_RATE
- See Also:
- Constant Field Values
-
CONVERSION_SKILL
public static final java.lang.String CONVERSION_SKILL
- See Also:
- Constant Field Values
-
DEFENCE
public static final java.lang.String DEFENCE
- See Also:
- Constant Field Values
-
EXPLORE_LOST_CITY_RUMOUR
public static final java.lang.String EXPLORE_LOST_CITY_RUMOUR
- See Also:
- Constant Field Values
-
EXPOSED_TILES_RADIUS
public static final java.lang.String EXPOSED_TILES_RADIUS
- See Also:
- Constant Field Values
-
FORTIFIED
public static final java.lang.String FORTIFIED
- See Also:
- Constant Field Values
-
IMMIGRATION
public static final java.lang.String IMMIGRATION
- See Also:
- Constant Field Values
-
LAND_PAYMENT_MODIFIER
public static final java.lang.String LAND_PAYMENT_MODIFIER
- See Also:
- Constant Field Values
-
LIBERTY
public static final java.lang.String LIBERTY
- See Also:
- Constant Field Values
-
LINE_OF_SIGHT_BONUS
public static final java.lang.String LINE_OF_SIGHT_BONUS
- See Also:
- Constant Field Values
-
MINIMUM_COLONY_SIZE
public static final java.lang.String MINIMUM_COLONY_SIZE
- See Also:
- Constant Field Values
-
MISSIONARY_TRADE_BONUS
public static final java.lang.String MISSIONARY_TRADE_BONUS
- See Also:
- Constant Field Values
-
MOVEMENT_BONUS
public static final java.lang.String MOVEMENT_BONUS
- See Also:
- Constant Field Values
-
NATIVE_ALARM_MODIFIER
public static final java.lang.String NATIVE_ALARM_MODIFIER
- See Also:
- Constant Field Values
-
NATIVE_CONVERT_BONUS
public static final java.lang.String NATIVE_CONVERT_BONUS
- See Also:
- Constant Field Values
-
OFFENCE
public static final java.lang.String OFFENCE
- See Also:
- Constant Field Values
-
OFFENCE_AGAINST
public static final java.lang.String OFFENCE_AGAINST
- See Also:
- Constant Field Values
-
PEACE_TREATY
public static final java.lang.String PEACE_TREATY
- See Also:
- Constant Field Values
-
POPULAR_SUPPORT
public static final java.lang.String POPULAR_SUPPORT
- See Also:
- Constant Field Values
-
RELIGIOUS_UNREST_BONUS
public static final java.lang.String RELIGIOUS_UNREST_BONUS
- See Also:
- Constant Field Values
-
SAIL_HIGH_SEAS
public static final java.lang.String SAIL_HIGH_SEAS
- See Also:
- Constant Field Values
-
SHIP_TRADE_PENALTY
public static final java.lang.String SHIP_TRADE_PENALTY
- See Also:
- Constant Field Values
-
SMALL_MOVEMENT_PENALTY
public static final java.lang.String SMALL_MOVEMENT_PENALTY
- See Also:
- Constant Field Values
-
SOL
public static final java.lang.String SOL
- See Also:
- Constant Field Values
-
TILE_TYPE_CHANGE_PRODUCTION
public static final java.lang.String TILE_TYPE_CHANGE_PRODUCTION
- See Also:
- Constant Field Values
-
TRADE_BONUS
public static final java.lang.String TRADE_BONUS
- See Also:
- Constant Field Values
-
TRADE_VOLUME_PENALTY
public static final java.lang.String TRADE_VOLUME_PENALTY
- See Also:
- Constant Field Values
-
TREASURE_TRANSPORT_FEE
public static final java.lang.String TREASURE_TRANSPORT_FEE
- See Also:
- Constant Field Values
-
WAREHOUSE_STORAGE
public static final java.lang.String WAREHOUSE_STORAGE
- See Also:
- Constant Field Values
-
UNKNOWN
public static final float UNKNOWN
- See Also:
- Constant Field Values
-
DEFAULT_MODIFIER_INDEX
public static final int DEFAULT_MODIFIER_INDEX
- See Also:
- Constant Field Values
-
RESOURCE_PRODUCTION_INDEX
public static final int RESOURCE_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
COLONY_PRODUCTION_INDEX
public static final int COLONY_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
EXPERT_PRODUCTION_INDEX
public static final int EXPERT_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
FATHER_PRODUCTION_INDEX
public static final int FATHER_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
IMPROVEMENT_PRODUCTION_INDEX
public static final int IMPROVEMENT_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
AUTO_PRODUCTION_INDEX
public static final int AUTO_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
BUILDING_PRODUCTION_INDEX
public static final int BUILDING_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
NATION_PRODUCTION_INDEX
public static final int NATION_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
PARTY_PRODUCTION_INDEX
public static final int PARTY_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
DISASTER_PRODUCTION_INDEX
public static final int DISASTER_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
DEFAULT_PRODUCTION_INDEX
public static final int DEFAULT_PRODUCTION_INDEX
- See Also:
- Constant Field Values
-
BASE_COMBAT_INDEX
public static final int BASE_COMBAT_INDEX
- See Also:
- Constant Field Values
-
UNIT_ADDITIVE_COMBAT_INDEX
public static final int UNIT_ADDITIVE_COMBAT_INDEX
- See Also:
- Constant Field Values
-
UNIT_NORMAL_COMBAT_INDEX
public static final int UNIT_NORMAL_COMBAT_INDEX
- See Also:
- Constant Field Values
-
ROLE_COMBAT_INDEX
public static final int ROLE_COMBAT_INDEX
- See Also:
- Constant Field Values
-
GENERAL_COMBAT_INDEX
public static final int GENERAL_COMBAT_INDEX
- See Also:
- Constant Field Values
-
modifierType
private Modifier.ModifierType modifierType
The type of this Modifier.
-
value
private float value
The value of this Modifier.
-
increment
private float increment
The value increments per turn. This can be used to create Modifiers whose values increase or decrease over time.
-
incrementType
private Modifier.ModifierType incrementType
The type of increment.
-
modifierIndex
private int modifierIndex
A sorting index.
-
INCREMENT_TAG
private static final java.lang.String INCREMENT_TAG
- See Also:
- Constant Field Values
-
INCREMENT_TYPE_TAG
private static final java.lang.String INCREMENT_TYPE_TAG
- See Also:
- Constant Field Values
-
INDEX_TAG
private static final java.lang.String INDEX_TAG
- See Also:
- Constant Field Values
-
TYPE_TAG
private static final java.lang.String TYPE_TAG
- See Also:
- Constant Field Values
-
OLD_INCREMENT_TYPE_TAG
private static final java.lang.String OLD_INCREMENT_TYPE_TAG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Modifier
public Modifier(Specification specification)
Deliberately empty constructor.- Parameters:
specification
- The definingSpecification
.
-
Modifier
public Modifier(java.lang.String id, float value, Modifier.ModifierType type, FreeColObject source, int modifierIndex)
Creates a newModifier
instance.- Parameters:
id
- The object identifier.value
- The modifier value.type
- The type of the modifier.source
- The sourceFreeColObject
.modifierIndex
- The modifier index.
-
Modifier
public Modifier(java.lang.String id, float value, Modifier.ModifierType type, FreeColObject source)
Creates a newModifier
instance.- Parameters:
id
- The object identifier.value
- The modifier value.type
- The type of the modifier.source
- The sourceFreeColObject
.
-
Modifier
public Modifier(java.lang.String id, float value, Modifier.ModifierType type)
Creates a newModifier
instance.- Parameters:
id
- The object identifier.value
- The modifier value.type
- The type of the modifier.
-
Modifier
public Modifier(FreeColXMLReader xr, Specification specification) throws javax.xml.stream.XMLStreamException
Creates a newModifier
instance.- Parameters:
xr
- TheFreeColXMLReader
to read from.specification
- TheSpecification
to refer to.- Throws:
javax.xml.stream.XMLStreamException
- if there is an error reading the stream.
-
-
Method Detail
-
makeModifier
public static Modifier makeModifier(Modifier modifier)
Make a copy of a modifier.- Parameters:
modifier
- TheModifier
to copy.- Returns:
- A copy of the modifier.
-
makeTimedModifier
public static Modifier makeTimedModifier(java.lang.String id, Modifier template, Turn start)
Makes a timed modifier (one with start/end turn and increment) with the specified identifier from a template modifier (containing the increment and value) and given start turn. Currently the only suitable template is "model.modifier.colonyGoodsParty".- Parameters:
id
- The id for the new modifier.template
- A templateModifier
with increment.start
- The startingTurn
.- Returns:
- A new timed modifier.
-
getType
public final Modifier.ModifierType getType()
Get the modifier type.- Returns:
- The
ModifierType
.
-
setType
public final Modifier setType(Modifier.ModifierType modifierType)
Set the modifier type.- Parameters:
modifierType
- The newModifierType
value.- Returns:
- This modifier.
-
isFloatKnown
public static boolean isFloatKnown(float value)
Is this a "known" value.- Parameters:
value
- The value to test.- Returns:
- True if the value is known.
-
isKnown
public boolean isKnown()
Does this modifier have a known value? That is, is it not set to the UNKNOWN value.- Returns:
- True if the value is known.
-
getValue
public final float getValue()
Get the modifier value.- Returns:
- The modifier value.
-
getValue
public final float getValue(Turn turn)
Get the value the modifier during the given Turn.- Parameters:
turn
- TheTurn
to check.- Returns:
- The turn-dependent modifier value.
-
setValue
public final Modifier setValue(float value)
Set the modifier value.- Parameters:
value
- The new value.- Returns:
- This modifier.
-
hasIncrement
public final boolean hasIncrement()
Does this modifier have an increment?- Returns:
- True if this modifier has an increment.
-
getIncrementType
public final Modifier.ModifierType getIncrementType()
Get the increment type.- Returns:
- The increment
ModifierType
.
-
setIncrementType
public final Modifier setIncrementType(Modifier.ModifierType incrementType)
Set the increment type.- Parameters:
incrementType
- The new incrementModifierType
.- Returns:
- This modifier.
-
getIncrement
public final float getIncrement()
Get the increment value.- Returns:
- The increment value.
-
setIncrement
public final Modifier setIncrement(float increment)
Set the increment value.- Parameters:
increment
- The new value.- Returns:
- This modifier.
-
setIncrement
public final Modifier setIncrement(Modifier.ModifierType incrementType, float increment, Turn firstTurn, Turn lastTurn)
Set the whole increment.- Parameters:
incrementType
- The newModifierType
.increment
- The new increment value.firstTurn
- The firstTurn
the increment is active.lastTurn
- The lastTurn
the increment is active.- Returns:
- This modifier.
-
getModifierIndex
public final int getModifierIndex()
Get the modifier index.- Returns:
- The modifier index.
-
setModifierIndex
public final Modifier setModifierIndex(int modifierIndex)
Set the modifier index.- Parameters:
modifierIndex
- The new modifier index value.- Returns:
- This modifier.
-
apply
public float apply(float base, float value)
Applies the given value to the given base value, depending on the type of this Modifier.- Parameters:
base
- afloat
valuevalue
- afloat
value- Returns:
- a
float
value
-
apply
private float apply(float base, float value, Modifier.ModifierType type)
Applies the given value to the given base value, depending on the give modifier Type.- Parameters:
base
- The base value.value
- The modifier value.type
- TheModifierType
.- Returns:
- The result of applying the value to the base.
-
applyTo
public float applyTo(float number)
Applies this Modifier to a number. This method does not take scopes, increments or time limits into account.- Parameters:
number
- afloat
value- Returns:
- a
float
value
-
applyTo
public float applyTo(float number, Turn turn)
Applies this Modifier to a number. This method does take increments into account.- Parameters:
number
- The number to modify.turn
- TheTurn
to evaluate increments in.- Returns:
- The modified number.
-
copyIn
public <T extends FreeColObject> boolean copyIn(T other)
Copy another FreeColObject into this one if it is compatible.
-
writeAttributes
protected void writeAttributes(FreeColXMLWriter xw) throws javax.xml.stream.XMLStreamException
Write the attributes of this object to a stream. To be overridden if required by any object that has attributes and uses the toXML(FreeColXMLWriter, String) call.- Overrides:
writeAttributes
in classFeature
- Parameters:
xw
- TheFreeColXMLWriter
to write to.- Throws:
javax.xml.stream.XMLStreamException
- if there are any problems writing to the stream.
-
readAttributes
protected void readAttributes(FreeColXMLReader xr) throws javax.xml.stream.XMLStreamException
Reads the attributes of this object from an XML stream.- Overrides:
readAttributes
in classFeature
- Parameters:
xr
- TheFreeColXMLReader
to read from.- Throws:
javax.xml.stream.XMLStreamException
- if there is a problem reading the stream.
-
getXMLTagName
public java.lang.String getXMLTagName()
Get the serialization tag for this object.- Specified by:
getXMLTagName
in classFreeColObject
- Returns:
- The tag.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classFreeColObject
-
-