Enum Class TaskState

java.lang.Object
java.lang.Enum<TaskState>
org.tasktide.core.model.state_summary.TaskState
All Implemented Interfaces:
Serializable, Comparable<TaskState>, Constable, StateSummaryType

public enum TaskState extends Enum<TaskState> implements StateSummaryType
Enumeration of valid Task States: Pending, Active, Error, Complete
  • Enum Constant Details

    • PENDING

      public static final TaskState PENDING
    • ACTIVE

      public static final TaskState ACTIVE
    • ERROR

      public static final TaskState ERROR
    • TIME_KEEPER

      public static final TaskState TIME_KEEPER
    • COMPLETE

      public static final TaskState COMPLETE
    • HOLD

      public static final TaskState HOLD
    • HAULT

      public static final TaskState HAULT
  • Method Details

    • values

      public static TaskState[] 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 TaskState 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
    • toString

      public abstract String toString()
      Represent enum as string
      Overrides:
      toString in class Enum<TaskState>
      Returns:
      String
    • isState

      public abstract boolean isState(String query)
      Compare to queried state string
      Parameters:
      query -
      Returns:
      boolean
    • isState

      public abstract boolean isState(TaskState taskState)
      Compare to queried state
      Parameters:
      taskState -
      Returns:
      boolean
    • mapToItemState

      public abstract ItemState mapToItemState()
      Map TaskState to an ItemState
      Returns:
      ItemState
    • indexOf

      public static int indexOf(String query)
      Return index of queried state
      Parameters:
      query -
      Returns:
      int
    • hasType

      public static boolean hasType(String query)
      Check if queried type exists
      Parameters:
      query -
      Returns:
      boolean
    • get

      public static TaskState get(String query)
      Return TaskState matching query, otherwise null
      Parameters:
      query -
      Returns:
      null