com.planet_ink.coffee_mud.Items.interfaces
Enum Technical.TechCommand

java.lang.Object
  extended by java.lang.Enum<Technical.TechCommand>
      extended by com.planet_ink.coffee_mud.Items.interfaces.Technical.TechCommand
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Technical.TechCommand>
Enclosing interface:
Technical

public static enum Technical.TechCommand
extends java.lang.Enum<Technical.TechCommand>

A TechCommand is an internal message that is only understood between electrical objects, typically ship components, but potentially between computer components of all sorts.


Enum Constant Summary
ACCELERATED
           
ACCELERATION
           
AIRREFRESH
           
COMPONENTFAILURE
           
GRAVITYCHANGE
           
POWERSET
           
SENSE
           
SHIELDSET
           
THRUST
           
WEAPONFIRE
           
WEAPONTARGETSET
           
 
Method Summary
 java.lang.Object[] confirmAndTranslate(java.lang.String[] parts)
          When a tech command of this enum type is received with its parameters, the parameters are parsed into a list and passed to this method to confirm their types, translate them to the appropriate types, and return the parameters as their original objects in an Object array.
static Technical.TechCommand findCommand(java.lang.String[] parts)
          Returns the techcommand object that matches the first word in this parsed command string list.
 java.lang.Class<?>[] getParms()
          Returns the form of the parameters of this tech command
 java.lang.String makeCommand(java.lang.Object... parts)
          Creates a new tech command of this enums type using the given parameters, and returns the message as a string, or "" if an error occurred due to bad parameters.
static Technical.TechCommand valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Technical.TechCommand[] 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

THRUST

public static final Technical.TechCommand THRUST

ACCELERATED

public static final Technical.TechCommand ACCELERATED

ACCELERATION

public static final Technical.TechCommand ACCELERATION

COMPONENTFAILURE

public static final Technical.TechCommand COMPONENTFAILURE

SENSE

public static final Technical.TechCommand SENSE

AIRREFRESH

public static final Technical.TechCommand AIRREFRESH

POWERSET

public static final Technical.TechCommand POWERSET

WEAPONTARGETSET

public static final Technical.TechCommand WEAPONTARGETSET

WEAPONFIRE

public static final Technical.TechCommand WEAPONFIRE

SHIELDSET

public static final Technical.TechCommand SHIELDSET

GRAVITYCHANGE

public static final Technical.TechCommand GRAVITYCHANGE
Method Detail

values

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

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

valueOf

public static Technical.TechCommand 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

getParms

public java.lang.Class<?>[] getParms()
Returns the form of the parameters of this tech command

Returns:
the form of the parameters of this tech command

makeCommand

public java.lang.String makeCommand(java.lang.Object... parts)
Creates a new tech command of this enums type using the given parameters, and returns the message as a string, or "" if an error occurred due to bad parameters.

Parameters:
parts - the parameters, which must be perfectly valid for this enum
Returns:
the encoded tech command

confirmAndTranslate

public java.lang.Object[] confirmAndTranslate(java.lang.String[] parts)
When a tech command of this enum type is received with its parameters, the parameters are parsed into a list and passed to this method to confirm their types, translate them to the appropriate types, and return the parameters as their original objects in an Object array. null is returned if anything goes wrong

Parameters:
parts - the command parameters as a string list
Returns:
the command parameters as their original objects, or null

findCommand

public static Technical.TechCommand findCommand(java.lang.String[] parts)
Returns the techcommand object that matches the first word in this parsed command string list. Only the first entry matters.

Parameters:
parts - the entire command string list
Returns:
the techcommand that matches the first string, or null