Enum Class ProgramStatus

java.lang.Object
java.lang.Enum<ProgramStatus>
mars.venus.execute.ProgramStatus
All Implemented Interfaces:
Serializable, Comparable<ProgramStatus>, Constable

public enum ProgramStatus extends Enum<ProgramStatus>
Enumeration to indicate the status of the current program (which may involve more than one file). These status values were originally part of FileStatus, but were split off to eliminate unnecessary global state in the class.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    The program has yet to be assembled.
    The program has just been assembled successfully, and is runnable.
    The program stopped execution after starting, but is still runnable.
    The program is currently being executed by the simulator.
    The program stopped execution after starting, and is no longer runnable.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine whether the program is able to start, but is not currently running.
    boolean
    Determine whether the program has been previously started, but is not currently running.
    boolean
    Determine whether the program is able to run, but is not currently running.
    Returns the enum constant of this class with the specified name.
    static ProgramStatus[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • NOT_ASSEMBLED

      public static final ProgramStatus NOT_ASSEMBLED
      The program has yet to be assembled.
    • NOT_STARTED

      public static final ProgramStatus NOT_STARTED
      The program has just been assembled successfully, and is runnable.
    • RUNNING

      public static final ProgramStatus RUNNING
      The program is currently being executed by the simulator.
    • PAUSED

      public static final ProgramStatus PAUSED
      The program stopped execution after starting, but is still runnable.
    • TERMINATED

      public static final ProgramStatus TERMINATED
      The program stopped execution after starting, and is no longer runnable.
  • Method Details

    • values

      public static ProgramStatus[] 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 ProgramStatus 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
    • hasStarted

      public boolean hasStarted()
      Determine whether the program has been previously started, but is not currently running.
      Returns:
      true if the program is PAUSED or TERMINATED, or false otherwise.
    • canStart

      public boolean canStart()
      Determine whether the program is able to start, but is not currently running.
      Returns:
      true if the program is NOT_STARTED or PAUSED, or false otherwise.
    • isRunnable

      public boolean isRunnable()
      Determine whether the program is able to run, but is not currently running.
      Returns:
      true if the program is NOT_STARTED, PAUSED, or TERMINATED, or false otherwise.