com.motlin.risk.dice
Enum Casualties

java.lang.Object
  extended by java.lang.Enum<Casualties>
      extended by com.motlin.risk.dice.Casualties
All Implemented Interfaces:
Serializable, Comparable<Casualties>

public enum Casualties
extends Enum<Casualties>


Enum Constant Summary
ONE_ATTACKER
           
ONE_DEFENDER
           
ONE_OF_EACH
           
TWO_ATTACKERS
           
TWO_DEFENDERS
           
 
Method Summary
static Casualties get(int attackersKilled, int defendersKilled)
           
 int getAttackersKilled()
           
 int getDefendersKilled()
           
static Casualties valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Casualties[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ONE_ATTACKER

public static final Casualties ONE_ATTACKER

ONE_DEFENDER

public static final Casualties ONE_DEFENDER

ONE_OF_EACH

public static final Casualties ONE_OF_EACH

TWO_ATTACKERS

public static final Casualties TWO_ATTACKERS

TWO_DEFENDERS

public static final Casualties TWO_DEFENDERS
Method Detail

values

public static Casualties[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Casualties c : Casualties.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Casualties valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getAttackersKilled

public int getAttackersKilled()

getDefendersKilled

public int getDefendersKilled()

get

public static Casualties get(int attackersKilled,
                             int defendersKilled)