brbrain
Enum BRBrain.Instruction

java.lang.Object
  extended by java.lang.Enum<BRBrain.Instruction>
      extended by brbrain.BRBrain.Instruction
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<BRBrain.Instruction>
Enclosing class:
BRBrain

public static enum BRBrain.Instruction
extends java.lang.Enum<BRBrain.Instruction>

BRBrain protocol packet instructions, see BRBrain class header doc for details.


Enum Constant Summary
I_DATA
           
I_PING
           
I_READ_DATA
           
I_SET_READ_FORMAT
           
I_SET_WRITE_FORMAT
           
I_STATUS
           
I_WRITE_DATA
           
 
Field Summary
 int code
           
 
Method Summary
static BRBrain.Instruction valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static BRBrain.Instruction[] 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

I_PING

public static final BRBrain.Instruction I_PING

I_SET_READ_FORMAT

public static final BRBrain.Instruction I_SET_READ_FORMAT

I_SET_WRITE_FORMAT

public static final BRBrain.Instruction I_SET_WRITE_FORMAT

I_READ_DATA

public static final BRBrain.Instruction I_READ_DATA

I_WRITE_DATA

public static final BRBrain.Instruction I_WRITE_DATA

I_STATUS

public static final BRBrain.Instruction I_STATUS

I_DATA

public static final BRBrain.Instruction I_DATA
Field Detail

code

public final int code
Method Detail

values

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

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

valueOf

public static BRBrain.Instruction 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