Enum Class CubismHistory.Unavailable

java.lang.Object
java.lang.Enum<CubismHistory.Unavailable>
dev.turboism.sdk.cubism.history.CubismHistory.Unavailable
All Implemented Interfaces:
CubismHistory, Serializable, Comparable<CubismHistory.Unavailable>, Constable
Enclosing interface:
CubismHistory

public static enum CubismHistory.Unavailable extends Enum<CubismHistory.Unavailable> implements CubismHistory
Singleton fail-closed implementation returned by CubismHistory.unavailable().
  • Enum Constant Details

  • Method Details

    • values

      public static CubismHistory.Unavailable[] 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 CubismHistory.Unavailable 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
    • snapshot

      public HistorySnapshot snapshot()
      Description copied from interface: CubismHistory
      Returns the current immutable state of the active document's native Undo history.
      Specified by:
      snapshot in interface CubismHistory
    • moveTo

      public HistoryMoveResult moveTo(long expectedGeneration, long expectedRevision, int position)
      Description copied from interface: CubismHistory
      Moves the history cursor to position when the observed generation and revision still match.
      Specified by:
      moveTo in interface CubismHistory
      Parameters:
      expectedGeneration - the HistorySnapshot.generation() the caller built against
      expectedRevision - the HistorySnapshot.revision() the caller built against
      position - target cursor position within [0, entries.size]
      Returns:
      the move result; a stale expectation yields REJECTED_STALE and no change