net.sf.freecol.common.model
Enum Unit.Role

java.lang.Object
  extended by java.lang.Enum<Unit.Role>
      extended by net.sf.freecol.common.model.Unit.Role
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Unit.Role>
Enclosing class:
Unit

public static enum Unit.Role
extends java.lang.Enum<Unit.Role>

The roles a Unit can have.


Enum Constant Summary
DEFAULT
           
DRAGOON
           
MISSIONARY
           
PIONEER
           
SCOUT
           
SOLDIER
           
 
Method Summary
 java.lang.String getId()
           
static Unit.Role valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Unit.Role[] 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

DEFAULT

public static final Unit.Role DEFAULT

PIONEER

public static final Unit.Role PIONEER

MISSIONARY

public static final Unit.Role MISSIONARY

SOLDIER

public static final Unit.Role SOLDIER

SCOUT

public static final Unit.Role SCOUT

DRAGOON

public static final Unit.Role DRAGOON
Method Detail

values

public static Unit.Role[] 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 (Unit.Role c : Unit.Role.values())
    System.out.println(c);

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

valueOf

public static Unit.Role valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

getId

public java.lang.String getId()