spellcast.game
Enum TurnType

java.lang.Object
  extended by java.lang.Enum<TurnType>
      extended by spellcast.game.TurnType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TurnType>

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

The type of turns available in spellcast.

Version:
$Revision: 1.1 $
Author:
Barrie Treloar

Enum Constant Summary
AFTER_GAME
           
BEFORE_GAME
           
HASTE
           
NORMAL
           
TIMESTOP
           
 
Method Summary
 boolean isHaste()
          Indicates whether this turn is a Haste turn.
 boolean isNormal()
          Indicates whether this turn is a Normal turn.
 boolean isTimeStop()
          Indicates whether this turn is a TimeStop turn.
static TurnType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TurnType[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NORMAL

public static final TurnType NORMAL

HASTE

public static final TurnType HASTE

TIMESTOP

public static final TurnType TIMESTOP

BEFORE_GAME

public static final TurnType BEFORE_GAME

AFTER_GAME

public static final TurnType AFTER_GAME
Method Detail

values

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

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

valueOf

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

isNormal

public boolean isNormal()
Indicates whether this turn is a Normal turn.


isHaste

public boolean isHaste()
Indicates whether this turn is a Haste turn.


isTimeStop

public boolean isTimeStop()
Indicates whether this turn is a TimeStop turn.



Copyright © 2001-2005 Spellcast. All Rights Reserved.