cz.cuni.amis.pogamut.defcon.consts
Enum GameSpeed

Package class diagram package GameSpeed
java.lang.Object
  extended by java.lang.Enum<GameSpeed>
      extended by cz.cuni.amis.pogamut.defcon.consts.GameSpeed
All Implemented Interfaces:
Serializable, Comparable<GameSpeed>

public enum GameSpeed
extends Enum<GameSpeed>

One of the game options. Might be accessed through GameInfo#GetOptionValue(), GameOption and GameInfo#getGameSpeed().

Author:
Radek 'Black_Hand' Pibil

Enum Constant Summary
FAST
           
MEDIUM
           
PAUSED
           
REALTIME
           
SLOW
           
 
Field Summary
 int factor
           
 
Method Summary
static GameSpeed getEnum(int factor)
           
static GameSpeed valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GameSpeed[] 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

PAUSED

public static final GameSpeed PAUSED

REALTIME

public static final GameSpeed REALTIME

SLOW

public static final GameSpeed SLOW

MEDIUM

public static final GameSpeed MEDIUM

FAST

public static final GameSpeed FAST
Field Detail

factor

public final int factor
Method Detail

values

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

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

valueOf

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

getEnum

public static GameSpeed getEnum(int factor)


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.