Enum ProcessCommand

  • All Implemented Interfaces:
    Command, java.io.Serializable, java.lang.Comparable<ProcessCommand>

    public enum ProcessCommand
    extends java.lang.Enum<ProcessCommand>
    implements Command
    Commands for reacting to a decision to be made during a process. A process command is semantically more general than a sequence command. While a "next" command is similar to "continue" in the context of a wizard and either could reasonably cause a progresion to the next stage of the sequence, selecting an OK button for a confirmation dialog would not be appropriate in response to the "next" command, although it would be for the "continue" command.
    Author:
    Garret Wilson
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ABORT
      The command for aborting a process.
      CONTINUE
      The command for continuing a process.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ProcessCommand valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ProcessCommand[] 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

      • CONTINUE

        public static final ProcessCommand CONTINUE
        The command for continuing a process. This command is usually bound to the Enter key and signifies that some step in a process should be approved.
      • ABORT

        public static final ProcessCommand ABORT
        The command for aborting a process. This command is usually bound to the Escape key and signifies that the process should be canceled.
    • Method Detail

      • values

        public static ProcessCommand[] 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 (ProcessCommand c : ProcessCommand.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ProcessCommand 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