Enum Class InstructionType

java.lang.Object
java.lang.Enum<InstructionType>
com.j3d.engine.interact.macros.InstructionType
All Implemented Interfaces:
Serializable, Comparable<InstructionType>, Constable

public enum InstructionType extends Enum<InstructionType>
The type of instruction for a given MacroLine.
Author:
Lehlogonlo Poole
See Also:
  • Enum Constant Details

    • COMMAND_EXEC

      public static final InstructionType COMMAND_EXEC
      The line is a command execution string to be pasted into the command palette
    • MOUSE_MOVE

      public static final InstructionType MOUSE_MOVE
      unused.
    • SELECTION

      public static final InstructionType SELECTION
      The line represents a selection box with a specific type
    • CAMERA

      public static final InstructionType CAMERA
      The line represents a camera movement position.
  • Field Details

    • id

      private final String id
      The serialized form of the instruction type
  • Constructor Details

    • InstructionType

      private InstructionType(String id)
  • Method Details

    • values

      public static InstructionType[] 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

      public static InstructionType valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • getId

      public String getId()
      Gets the id of the instruction. The 3 character string which defines the line
      Returns:
      The Instruction Id
    • fromId

      public static InstructionType fromId(String id)
      Converts the given 3-character string into an instruction type enum
      Parameters:
      id - The incoming id
      Returns:
      The enum which this id belongs to or null if not found.