Package dev.turboism.sdk.cubism.history
Enum Class 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().-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>Nested classes/interfaces inherited from interface dev.turboism.sdk.cubism.history.CubismHistory
CubismHistory.Unavailable -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionmoveTo(long expectedGeneration, long expectedRevision, int position) Moves the history cursor topositionwhen the observed generation and revision still match.snapshot()Returns the current immutable state of the active document's native Undo history.static CubismHistory.UnavailableReturns the enum constant of this class with the specified name.static CubismHistory.Unavailable[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from interface dev.turboism.sdk.cubism.history.CubismHistory
isCurrentBinding, moveTo, redo, undo
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
snapshot
Description copied from interface:CubismHistoryReturns the current immutable state of the active document's native Undo history.- Specified by:
snapshotin interfaceCubismHistory
-
moveTo
Description copied from interface:CubismHistoryMoves the history cursor topositionwhen the observed generation and revision still match.- Specified by:
moveToin interfaceCubismHistory- Parameters:
expectedGeneration- theHistorySnapshot.generation()the caller built againstexpectedRevision- theHistorySnapshot.revision()the caller built againstposition- target cursor position within[0, entries.size]- Returns:
- the move result; a stale expectation yields
REJECTED_STALEand no change
-