|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<Player.Stance>
net.sf.freecol.common.model.Player.Stance
public static enum Player.Stance
Constants for describing the stance towards a player.
| Enum Constant Summary | |
|---|---|
ALLIANCE
|
|
CEASE_FIRE
|
|
PEACE
|
|
UNCONTACTED
|
|
WAR
|
|
| Method Summary | |
|---|---|
private void |
badStance()
|
private void |
badTransition(Player.Stance newStance)
|
Player.Stance |
getStanceFromTension(Tension tension)
Check whether tension has changed enough to merit a stance change. |
int |
getTensionModifier(Player.Stance newStance)
A stance change is about to happen. |
static Player.Stance |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Player.Stance[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Player.Stance UNCONTACTED
public static final Player.Stance ALLIANCE
public static final Player.Stance PEACE
public static final Player.Stance CEASE_FIRE
public static final Player.Stance WAR
| Method Detail |
|---|
public static Player.Stance[] values()
for (Player.Stance c : Player.Stance.values()) System.out.println(c);
public static Player.Stance valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is null
private void badStance()
throws java.lang.IllegalStateException
java.lang.IllegalStateException
private void badTransition(Player.Stance newStance)
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic Player.Stance getStanceFromTension(Tension tension)
tension - The Tension to check.
Stance appropriate to the tension level.
public int getTensionModifier(Player.Stance newStance)
throws java.lang.IllegalStateException
newStance - The new Stance.
java.lang.IllegalStateException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||