java.io.Serializable
, java.lang.Comparable<Technical.TechCommand>
public static enum Technical.TechCommand extends java.lang.Enum<Technical.TechCommand>
Enum Constant | Description |
---|---|
ACCELERATED |
|
ACCELERATION |
|
AIMSET |
|
AIRREFRESH |
|
COMPONENTFAILURE |
|
DIRSET |
|
FIRE |
|
GRAVITYCHANGE |
|
POWERSET |
|
SENSE |
|
SHIELDSET |
|
SWSVCALLOW |
|
SWSVCNEED |
|
SWSVCREQ |
|
SWSVCRES |
|
TARGETSET |
|
THRUST |
Modifier and Type | Method | Description |
---|---|---|
java.lang.Object[] |
confirmAndTranslate(java.lang.String partStr) |
When a tech command of this enum type is received with its parameters,
the parameters are parsed passed to this method to parse into a list and
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.
|
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.
|
public static final Technical.TechCommand THRUST
public static final Technical.TechCommand ACCELERATED
public static final Technical.TechCommand ACCELERATION
public static final Technical.TechCommand COMPONENTFAILURE
public static final Technical.TechCommand SENSE
public static final Technical.TechCommand AIRREFRESH
public static final Technical.TechCommand POWERSET
public static final Technical.TechCommand DIRSET
public static final Technical.TechCommand AIMSET
public static final Technical.TechCommand TARGETSET
public static final Technical.TechCommand FIRE
public static final Technical.TechCommand SHIELDSET
public static final Technical.TechCommand GRAVITYCHANGE
public static final Technical.TechCommand SWSVCALLOW
public static final Technical.TechCommand SWSVCNEED
public static final Technical.TechCommand SWSVCREQ
public static final Technical.TechCommand SWSVCRES
public static Technical.TechCommand[] values()
for (Technical.TechCommand c : Technical.TechCommand.values()) System.out.println(c);
public static Technical.TechCommand valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.Class<?>[] getParms()
public java.lang.String makeCommand(java.lang.Object... parts)
parts
- the parameters, which must be perfectly valid for this enumpublic java.lang.Object[] confirmAndTranslate(java.lang.String partStr)
partStr
- the command parameters as a string to parsepublic static Technical.TechCommand findCommand(java.lang.String parts)
parts
- the entire command string list