|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.FeatureContainer
public class FeatureContainer
Constructor Summary | |
---|---|
FeatureContainer()
|
Method Summary | |
---|---|
void |
add(FeatureContainer featureContainer)
Describe add method here. |
boolean |
addAbility(Ability ability)
Add the given Ability to the set of Abilities present. |
boolean |
addModifier(Modifier modifier)
Add the given Modifier to the set of Modifiers present. |
float |
applyModifier(float number,
java.lang.String id)
Applies a Set of Modifiers with the given ID to the given float value. |
float |
applyModifier(float number,
java.lang.String id,
FreeColGameObjectType objectType)
Applies a Set of Modifiers with the given ID which match the given FreeColGameObjectType to the given float value. |
float |
applyModifier(float number,
java.lang.String id,
FreeColGameObjectType objectType,
Turn turn)
Applies a Set of Modifiers with the given ID which match the given FreeColGameObjectType and Turn to the given float value. |
static float |
applyModifierSet(float number,
Turn turn,
java.util.Set<Modifier> modifierSet)
Applies a given Set of Modifiers to the given float value. |
boolean |
containsAbilityKey(java.lang.String key)
|
boolean |
containsModifierKey(java.lang.String key)
|
java.util.Set<Ability> |
getAbilities()
|
java.util.Set<Ability> |
getAbilitySet(java.lang.String id)
Returns a Set of Abilities with the given ID. |
java.util.Set<Ability> |
getAbilitySet(java.lang.String id,
FreeColGameObjectType objectType)
Returns a Set of Abilities with the given ID which apply to the given FreeColGameObjectType. |
java.util.Set<Ability> |
getAbilitySet(java.lang.String id,
FreeColGameObjectType objectType,
Turn turn)
Returns a Set of Abilities with the given ID which apply to the given FreeColGameObjectType and Turn. |
java.util.Set<Modifier> |
getModifiers()
|
java.util.Set<Modifier> |
getModifierSet(java.lang.String id)
Returns a Set of Abilities with the given ID. |
java.util.Set<Modifier> |
getModifierSet(java.lang.String id,
FreeColGameObjectType objectType)
Returns a Set of Abilities with the given ID which apply to the given FreeColGameObjectType. |
java.util.Set<Modifier> |
getModifierSet(java.lang.String id,
FreeColGameObjectType objectType,
Turn turn)
Returns a Set of Abilities with the given ID which apply to the given FreeColGameObjectType and Turn. |
static boolean |
hasAbility(java.util.Set<Ability> abilitySet)
Returns true if the given Set of Abilities is not empty and does not contain any Abilities with the value false. |
boolean |
hasAbility(java.lang.String id)
Returns true if this Player has the ability with the given ID. |
boolean |
hasAbility(java.lang.String id,
FreeColGameObjectType objectType)
Returns true if this Player has the ability with the given ID. |
boolean |
hasAbility(java.lang.String id,
FreeColGameObjectType objectType,
Turn turn)
Returns true if this Player has the ability with the given ID. |
void |
remove(FeatureContainer featureContainer)
Describe remove method here. |
Ability |
removeAbility(Ability oldAbility)
Removes and returns a Ability from this ability set. |
Modifier |
removeModifier(Modifier oldModifier)
Removes and returns a Modifier from this modifier set. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeatureContainer()
Method Detail |
---|
public java.util.Set<Ability> getAbilities()
public java.util.Set<Modifier> getModifiers()
public java.util.Set<Ability> getAbilitySet(java.lang.String id)
id
- a String
value
Set
valuepublic java.util.Set<Ability> getAbilitySet(java.lang.String id, FreeColGameObjectType objectType)
id
- a String
valueobjectType
- a FreeColGameObjectType
value
Set
valuepublic java.util.Set<Ability> getAbilitySet(java.lang.String id, FreeColGameObjectType objectType, Turn turn)
id
- a String
valueobjectType
- a FreeColGameObjectType
valueturn
- a Turn
value
Set
valuepublic boolean hasAbility(java.lang.String id)
id
- a String
value
boolean
valuepublic boolean hasAbility(java.lang.String id, FreeColGameObjectType objectType)
id
- a String
valueobjectType
- a FreeColGameObjectType
value
boolean
valuepublic boolean hasAbility(java.lang.String id, FreeColGameObjectType objectType, Turn turn)
id
- a String
valueobjectType
- a FreeColGameObjectType
valueturn
- a Turn
value
boolean
valuepublic static boolean hasAbility(java.util.Set<Ability> abilitySet)
boolean
valuepublic java.util.Set<Modifier> getModifierSet(java.lang.String id)
id
- a String
value
Set
valuepublic java.util.Set<Modifier> getModifierSet(java.lang.String id, FreeColGameObjectType objectType)
id
- a String
valueobjectType
- a FreeColGameObjectType
value
Set
valuepublic java.util.Set<Modifier> getModifierSet(java.lang.String id, FreeColGameObjectType objectType, Turn turn)
id
- a String
valueobjectType
- a FreeColGameObjectType
valueturn
- a Turn
value
Set
valuepublic float applyModifier(float number, java.lang.String id)
number
- a float
valueid
- a String
valuepublic float applyModifier(float number, java.lang.String id, FreeColGameObjectType objectType)
number
- a float
valueid
- a String
valueobjectType
- a FreeColGameObjectType
valuepublic float applyModifier(float number, java.lang.String id, FreeColGameObjectType objectType, Turn turn)
number
- a float
valueid
- a String
valueobjectType
- a FreeColGameObjectType
valueturn
- a Turn
valuepublic static float applyModifierSet(float number, Turn turn, java.util.Set<Modifier> modifierSet)
number
- a float
valueturn
- a Turn
value
float
valuepublic boolean addAbility(Ability ability)
ability
- a Ability
value
public boolean addModifier(Modifier modifier)
modifier
- a Modifier
value
public Ability removeAbility(Ability oldAbility)
oldAbility
- a Ability
value
Ability
valuepublic Modifier removeModifier(Modifier oldModifier)
oldModifier
- a Modifier
value
Modifier
valuepublic void add(FeatureContainer featureContainer)
add
method here.
featureContainer
- a FeatureContainer
valuepublic void remove(FeatureContainer featureContainer)
remove
method here.
featureContainer
- a FeatureContainer
valuepublic boolean containsAbilityKey(java.lang.String key)
public boolean containsModifierKey(java.lang.String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |