server.framework.models
Enum Setting

java.lang.Object
  extended by java.lang.Enum<Setting>
      extended by server.framework.models.Setting
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Setting>

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

Enum that specifies the settings used in the game. When settings are to be added, the contents of this enum must be extended.

Author:
Martin Jarrett, Eivind Sorteberg

Enum Constant Summary
nof_players
           
score
           
teams
           
time
           
 
Method Summary
static Setting getSetting(java.lang.String name)
          Used to find the enum with the specified name.
 java.lang.String getText()
           
 java.lang.String toString()
           
static Setting valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Setting[] 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, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

score

public static final Setting score

time

public static final Setting time

teams

public static final Setting teams

nof_players

public static final Setting nof_players
Method Detail

values

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

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

valueOf

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

getText

public java.lang.String getText()
Returns:
The name of the setting.

getSetting

public static Setting getSetting(java.lang.String name)
Used to find the enum with the specified name.

Parameters:
name - The name of the setting.
Returns:
The setting that corresponds to the specified name.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<Setting>
Returns:
The name of the setting.