Package com.j3d.engine.interact.cmd
Enum Class CmdToken.Type
- All Implemented Interfaces:
Serializable,Comparable<CmdToken.Type>,Constable
- Enclosing class:
CmdToken
Defines the possible types a command token can represent.
Each type is associated with a Java class and a usage string for help messages.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?> Returns the Java class associated with this token type.toUsage()Returns a short usage string for this token type.static CmdToken.TypeReturns the enum constant of this class with the specified name.static CmdToken.Type[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CMD_NAME
Represents the command name itself. -
VECTOR3
Represents a 3D vector. -
ID_POINT
-
ID_LINE
-
ID_TRI
-
ID_THING
-
ID_CURVE
-
COLOUR
-
STRING
-
INT
-
DOUBLE
-
BOOL
-
TAGGED
-
-
Field Details
-
clazz
The Java class that this token type maps to. -
usage
A short string for usage hints.
-
-
Constructor Details
-
Type
Constructs a Type enum constant.- Parameters:
clazz- The Java class associated with this token type.usage- A short string describing the usage of this type, often used in help messages.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getTypeClass
Returns the Java class associated with this token type.- Returns:
- The Class object.
-
toUsage
Returns a short usage string for this token type.- Returns:
- The usage string.
-