Enum Class ItemState

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

public enum ItemState extends Enum<ItemState> implements StateSummaryType
Enumeration of valid item states of ToDo, Locked, Done, Error
  • Enum Constant Details

    • TODO

      public static final ItemState TODO
    • LOCKED

      public static final ItemState LOCKED
    • DONE

      public static final ItemState DONE
    • ERROR

      public static final ItemState ERROR
    • FOR_UNLOCK

      public static final ItemState FOR_UNLOCK
    • HOLD

      public static final ItemState HOLD
    • HAULT

      public static final ItemState HAULT
  • Method Details

    • values

      public static ItemState[] 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 ItemState 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
    • isState

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

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

      public abstract TaskState mapToTaskState()
      Map ItemState to a TaskState
      Returns:
      TaskState
    • toString

      public abstract String toString()
      Represent value as a string
      Overrides:
      toString in class Enum<ItemState>
      Returns:
      String
    • 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 ItemState get(String query)
      Map queried string to an ItemState
      Parameters:
      query -
      Returns:
      ItemState
    • valuesString

      public static String valuesString()
      Represent enum as string
      Returns:
      String
    • fetchEmptyStateMap

      public static Map<ItemState, Integer> fetchEmptyStateMap()
      Initializes an empty state map
      Returns:
      Map-ItemState, int