|
||||||||||
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.Feature
public abstract class Feature
The Feature
class encapsulates a bonus or penalty
that can be applied to any action within the game, most obviously
combat.
Field Summary |
---|
Fields inherited from class net.sf.freecol.common.model.FreeColObject |
---|
ID_ATTRIBUTE_TAG |
Constructor Summary | |
---|---|
Feature()
|
Method Summary | |
---|---|
boolean |
appliesTo(FreeColGameObjectType objectType)
Returns true if the appliesTo method of at least
one Scope object returns true. |
boolean |
appliesTo(FreeColGameObjectType objectType,
Turn turn)
Returns true if the appliesTo method of at least
one Scope object returns true. |
boolean |
equals(java.lang.Object o)
|
Turn |
getFirstTurn()
Get the firstTurn value. |
Turn |
getLastTurn()
Get the LastTurn value. |
java.util.List<Scope> |
getScopes()
Get the Scopes value. |
FreeColGameObjectType |
getSource()
Get the Source value. |
int |
hashCode()
|
boolean |
hasScope()
Get the Scope value. |
boolean |
hasTimeLimit()
Get the TimeLimit value. |
boolean |
isOutOfDate(Turn turn)
Returns true if the Feature has an lastTurn turn smaller than the turn given. |
void |
setFirstTurn(Turn newFirstTurn)
Set the firstTurn value. |
void |
setLastTurn(Turn newLastTurn)
Set the LastTurn value. |
void |
setScopes(java.util.List<Scope> newScopes)
Set the Scopes value. |
void |
setSource(FreeColGameObjectType newSource)
Set the Source value. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Feature()
Method Detail |
---|
public final boolean hasTimeLimit()
TimeLimit
value.
boolean
valuepublic final boolean hasScope()
Scope
value.
boolean
valuepublic final java.util.List<Scope> getScopes()
Scopes
value.
List
valuepublic final void setScopes(java.util.List<Scope> newScopes)
Scopes
value.
newScopes
- The new Scopes value.public final Turn getFirstTurn()
firstTurn
value.
Turn
valuepublic final void setFirstTurn(Turn newFirstTurn)
firstTurn
value.
newFirstTurn
- The new FirstTurn value.public final Turn getLastTurn()
LastTurn
value.
Turn
valuepublic final void setLastTurn(Turn newLastTurn)
LastTurn
value.
newLastTurn
- The new LastTurn value.public final FreeColGameObjectType getSource()
Source
value.
String
valuepublic final void setSource(FreeColGameObjectType newSource)
Source
value.
newSource
- The new Source value.public boolean appliesTo(FreeColGameObjectType objectType)
appliesTo
method of at least
one Scope
object returns true.
objectType
- a FreeColGameObjectType
value
boolean
valuepublic boolean appliesTo(FreeColGameObjectType objectType, Turn turn)
appliesTo
method of at least
one Scope
object returns true.
objectType
- a FreeColGameObjectType
valueturn
- a Turn
value
boolean
valuepublic boolean isOutOfDate(Turn turn)
turn
- a Turn
value
boolean
valuepublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |