jurpe.combat
Enum DefenseType

java.lang.Object
  extended by java.lang.Enum<DefenseType>
      extended by jurpe.combat.DefenseType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<DefenseType>

public enum DefenseType
extends java.lang.Enum<DefenseType>

DefenseType util class for type of defenses.

Author:
Alessio Saltarin

Enum Constant Summary
ACTIVE_BLOCK
           
ACTIVE_DODGE
           
ACTIVE_PARRY
           
 
Method Summary
 boolean isAvailable()
          If Active Defense is available this turn.
 void setAvailable(boolean avail)
          Set availability of Active Defenses.
 java.lang.String toString()
          Description of this defense type.
static DefenseType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static DefenseType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ACTIVE_BLOCK

public static final DefenseType ACTIVE_BLOCK

ACTIVE_DODGE

public static final DefenseType ACTIVE_DODGE

ACTIVE_PARRY

public static final DefenseType ACTIVE_PARRY
Method Detail

values

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

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

valueOf

public static DefenseType 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

isAvailable

public boolean isAvailable()
If Active Defense is available this turn.

Returns:
true, if Active Defenses are available this turn.

setAvailable

public void setAvailable(boolean avail)
Set availability of Active Defenses.

Parameters:
avail - true, if active defenses are available this turn.

toString

public java.lang.String toString()
Description of this defense type.

Overrides:
toString in class java.lang.Enum<DefenseType>
Returns:
A description of this defense type.

Jurpe - Java Universal Role Playing Engine - http://jurpe.sourceforge.net