server.framework.network.parser
Enum Action

java.lang.Object
  extended by java.lang.Enum<Action>
      extended by server.framework.network.parser.Action
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Action>

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

This enum contains the actions specified for both the framework and for games implementing the framework. New need to be added to this enum. Each enum contain a three-letter description corresponding to the action's specification.

Author:
Martin Jarrett, Eivind Sorteberg

Enum Constant Summary
alive_request
           
disconnect
           
empty_message
           
force
           
game_over
           
player
           
position
           
powerup_added
           
powerup_inactive
           
powerup_removed
           
ready
           
score
           
session_list
           
session_selected
           
setting_changed
           
setting_list
           
start
           
team
           
trap_added
           
 
Method Summary
static Action getActionObject(java.lang.String name)
          Returns the enum corresponding to the specified three-letter identifier.
 java.lang.String getName()
           
static Action valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Action[] 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

player

public static final Action player

alive_request

public static final Action alive_request

position

public static final Action position

ready

public static final Action ready

start

public static final Action start

disconnect

public static final Action disconnect

score

public static final Action score

setting_changed

public static final Action setting_changed

session_selected

public static final Action session_selected

game_over

public static final Action game_over

setting_list

public static final Action setting_list

session_list

public static final Action session_list

team

public static final Action team

empty_message

public static final Action empty_message

trap_added

public static final Action trap_added

powerup_added

public static final Action powerup_added

powerup_removed

public static final Action powerup_removed

powerup_inactive

public static final Action powerup_inactive

force

public static final Action force
Method Detail

values

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

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

valueOf

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

getName

public java.lang.String getName()
Returns:
The three-letter action identificator.

getActionObject

public static Action getActionObject(java.lang.String name)
Returns the enum corresponding to the specified three-letter identifier.

Parameters:
name - The action identifier.
Returns:
The action corresponding to the identifier.