|
|||||||||
| 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.model.FreeColGameObjectType
net.sf.freecol.common.model.BuildableType
net.sf.freecol.common.model.EquipmentType
public class EquipmentType
| Field Summary | |
|---|---|
private int |
combatLossPriority
Determines which type of Equipment will be lost first if the Unit carrying it is defeated. |
private java.util.List<java.lang.String> |
compatibleEquipment
A List containing the IDs of equipment types compatible with this one. |
private int |
maximumCount
The maximum number of equipment items that can be combined. |
private boolean |
militaryEquipment
Describe militaryEquipment here. |
static EquipmentType[] |
NO_EQUIPMENT
|
private java.util.HashMap<java.lang.String,java.lang.Boolean> |
requiredLocationAbilities
Stores the abilities required of the location where the unit is to be equipped. |
private Unit.Role |
role
The default Role of the Unit carrying this type of Equipment. |
| Fields inherited from class net.sf.freecol.common.model.BuildableType |
|---|
NOTHING, UNDEFINED |
| Fields inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
featureContainer |
| Fields inherited from class net.sf.freecol.common.model.FreeColObject |
|---|
ARRAY_SIZE, ID_ATTRIBUTE, ID_ATTRIBUTE_TAG, logger, PARTIAL_ATTRIBUTE |
| Constructor Summary | |
|---|---|
EquipmentType()
|
|
EquipmentType(int index)
|
|
| Method Summary | |
|---|---|
boolean |
canBeCaptured()
Returns true if this EquipmentType can be captured in combat. |
int |
getCombatLossPriority()
Get the CombatLossPriority value. |
java.util.Map<java.lang.String,java.lang.Boolean> |
getLocationAbilitiesRequired()
Returns the abilities required by this Type. |
int |
getMaximumCount()
Get the MaximumCount value. |
Unit.Role |
getRole()
Get the Role value. |
java.util.Map<java.lang.String,java.lang.Boolean> |
getUnitAbilitiesRequired()
Returns the abilities required by this Type. |
boolean |
isCompatibleWith(EquipmentType otherType)
Returns true if this type of equipment is compatible with the given type of equipment. |
boolean |
isMilitaryEquipment()
Returns true if Equipment of this type grants an offence bonus or a defence bonus. |
void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
setCombatLossPriority(int newCombatLossPriority)
Set the CombatLossPriority value. |
void |
setMaximumCount(int newMaximumCount)
Set the MaximumCount value. |
void |
setMilitaryEquipment(boolean newMilitaryEquipment)
Set the MilitaryEquipment value. |
void |
setRole(Unit.Role newRole)
Set the Role value. |
| Methods inherited from class net.sf.freecol.common.model.BuildableType |
|---|
getAbilitiesRequired, getAmountRequiredOf, getGoodsRequired, getGoodsRequiredAsString, getPopulationRequired, readChild, setGoodsRequired, setPopulationRequired |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
addAbility, addModifier, getFeatureContainer, getIndex, getModifierSet, hasAbility, hasAbility, readFromXML, readFromXMLImpl, setFeatureContainer, setIndex, toString, toXMLImpl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final EquipmentType[] NO_EQUIPMENT
private int maximumCount
private int combatLossPriority
private Unit.Role role
private boolean militaryEquipment
private java.util.HashMap<java.lang.String,java.lang.Boolean> requiredLocationAbilities
private java.util.List<java.lang.String> compatibleEquipment
| Constructor Detail |
|---|
public EquipmentType()
public EquipmentType(int index)
| Method Detail |
|---|
public final int getMaximumCount()
MaximumCount value.
int valuepublic final void setMaximumCount(int newMaximumCount)
MaximumCount value.
newMaximumCount - The new MaximumCount value.public final Unit.Role getRole()
Role value.
Role valuepublic final void setRole(Unit.Role newRole)
Role value.
newRole - The new Role value.public final int getCombatLossPriority()
CombatLossPriority value.
int valuepublic boolean canBeCaptured()
boolean valuepublic final void setCombatLossPriority(int newCombatLossPriority)
CombatLossPriority value.
newCombatLossPriority - The new CombatLossPriority value.public java.util.Map<java.lang.String,java.lang.Boolean> getUnitAbilitiesRequired()
public java.util.Map<java.lang.String,java.lang.Boolean> getLocationAbilitiesRequired()
public boolean isCompatibleWith(EquipmentType otherType)
otherType - an EquipmentType value
boolean valuepublic final boolean isMilitaryEquipment()
boolean valuepublic final void setMilitaryEquipment(boolean newMilitaryEquipment)
MilitaryEquipment value.
newMilitaryEquipment - The new MilitaryEquipment value.
public void readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readAttributes in class BuildableTypejavax.xml.stream.XMLStreamException
public void readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readChildren in class FreeColGameObjectTypejavax.xml.stream.XMLStreamException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||