|
|||||||||
| 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.FoundingFather
public class FoundingFather
Represents one FoundingFather to be contained in a Player object. The FoundingFather is able to grant new abilities or bonuses to the player, or to cause certain events.
| Nested Class Summary | |
|---|---|
static class |
FoundingFather.FoundingFatherType
|
| Field Summary | |
|---|---|
private java.util.Set<java.lang.String> |
availableTo
Stores the IDs of the Nations and NationTypes this FoundingFather is available to. |
private java.util.Map<java.lang.String,java.lang.String> |
events
Stores the Events of this Type. |
private FoundingFather.FoundingFatherType |
type
The type of this FoundingFather. |
private java.util.List<AbstractUnit> |
units
A list of AbstractUnits generated by this FoundingFather. |
private java.util.Map<UnitType,UnitType> |
upgrades
Holds the upgrades of Units caused by this FoundingFather. |
private int[] |
weight
The probability of this FoundingFather being offered for selection. |
| 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 | |
|---|---|
FoundingFather(int newIndex)
Creates a new FoundingFather instance. |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getEvents()
Returns all events. |
FoundingFather.FoundingFatherType |
getType()
Return the type of this FoundingFather. |
java.util.List<AbstractUnit> |
getUnits()
Get the Units value. |
java.util.Map<UnitType,UnitType> |
getUpgrades()
Get the Upgrades value. |
int |
getWeight(int age)
Get the weight of this FoundingFather. |
boolean |
isAvailableTo(Player player)
Returns true if this FoundingFather is available
to the Player given. |
void |
readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
readChildren(javax.xml.stream.XMLStreamReader in,
Specification specification)
|
void |
setEvents(java.util.Map<java.lang.String,java.lang.String> newEvents)
Describe setEvents method here. |
void |
setUnits(java.util.List<AbstractUnit> newUnits)
Set the Units value. |
void |
setUpgrades(java.util.Map<UnitType,UnitType> newUpgrades)
Set the Upgrades value. |
| Methods inherited from class net.sf.freecol.common.model.FreeColGameObjectType |
|---|
addAbility, addModifier, getFeatureContainer, getIndex, getModifierSet, hasAbility, hasAbility, readChild, 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 |
|---|
private int[] weight
private FoundingFather.FoundingFatherType type
private java.util.Map<UnitType,UnitType> upgrades
private java.util.Map<java.lang.String,java.lang.String> events
private java.util.Set<java.lang.String> availableTo
private java.util.List<AbstractUnit> units
| Constructor Detail |
|---|
public FoundingFather(int newIndex)
FoundingFather instance.
newIndex - an int value| Method Detail |
|---|
public FoundingFather.FoundingFatherType getType()
int valuepublic int getWeight(int age)
age - an int value
int valuepublic final java.util.List<AbstractUnit> getUnits()
Units value.
List valuepublic final void setUnits(java.util.List<AbstractUnit> newUnits)
Units value.
newUnits - The new Units value.public boolean isAvailableTo(Player player)
FoundingFather is available
to the Player given.
player - a Player value
boolean valuepublic final java.util.Map<UnitType,UnitType> getUpgrades()
Upgrades value.
Map valuepublic final void setUpgrades(java.util.Map<UnitType,UnitType> newUpgrades)
Upgrades value.
newUpgrades - The new Upgrades value.public java.util.Map<java.lang.String,java.lang.String> getEvents()
List of Events.public void setEvents(java.util.Map<java.lang.String,java.lang.String> newEvents)
setEvents method here.
public void readAttributes(javax.xml.stream.XMLStreamReader in,
Specification specification)
throws javax.xml.stream.XMLStreamException
readAttributes in class FreeColGameObjectTypejavax.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 | ||||||||