|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.freecol.common.model.Tension
public class Tension
Nested Class Summary | |
---|---|
static class |
Tension.Level
Constants for describing alarm levels. |
Field Summary | |
---|---|
static int |
ALLIANCE_MODIFIER
Tension modification to be used when an alliance treaty is signed. |
static int |
CEASE_FIRE_MODIFIER
Tension modification to be used when a cease-fire treaty is signed. |
static int |
PEACE_TREATY_MODIFIER
Tension modification to be used when a peace treaty is signed. |
static int |
TENSION_ADD_CAPITAL_ATTACKED
|
static int |
TENSION_ADD_DECLARE_WAR_FROM_CEASE_FIRE
Tension modification to be used when war is declared from a cease fire. |
static int |
TENSION_ADD_DECLARE_WAR_FROM_PEACE
Tension modification to be used when war is declared from a peaceful state. |
static int |
TENSION_ADD_LAND_TAKEN
|
static int |
TENSION_ADD_MAJOR
|
static int |
TENSION_ADD_MINOR
Constants for adding to the tension levels. |
static int |
TENSION_ADD_NORMAL
|
static int |
TENSION_ADD_SETTLEMENT_ATTACKED
|
static int |
TENSION_ADD_UNIT_DESTROYED
|
Constructor Summary | |
---|---|
Tension()
Constructor. |
|
Tension(int newTension)
|
Method Summary | |
---|---|
Tension.Level |
getLevel()
Returns the current tension level. |
int |
getValue()
Returns the current tension value. |
void |
modify(int newTension)
Modifies the tension by the given amount. |
void |
setLevel(Tension.Level level)
|
void |
setValue(int newValue)
Sets the current tension value. |
java.lang.String |
toString()
Returns the current tension level as a string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int TENSION_ADD_MINOR
public static final int TENSION_ADD_NORMAL
public static final int TENSION_ADD_MAJOR
public static final int TENSION_ADD_LAND_TAKEN
public static final int TENSION_ADD_UNIT_DESTROYED
public static final int TENSION_ADD_SETTLEMENT_ATTACKED
public static final int TENSION_ADD_CAPITAL_ATTACKED
public static final int TENSION_ADD_DECLARE_WAR_FROM_PEACE
public static final int TENSION_ADD_DECLARE_WAR_FROM_CEASE_FIRE
public static final int PEACE_TREATY_MODIFIER
public static final int CEASE_FIRE_MODIFIER
public static final int ALLIANCE_MODIFIER
Constructor Detail |
---|
public Tension()
public Tension(int newTension)
Method Detail |
---|
public int getValue()
Tension
.public void setValue(int newValue)
newValue
- The new value of the tension.public Tension.Level getLevel()
public void setLevel(Tension.Level level)
public void modify(int newTension)
newTension
- The amount to modify tension by.public java.lang.String toString()
toString
in class java.lang.Object
String
-representation of the
current tension level.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |