UndoTree<E> class

An tree of entries which are doubly linked from head to tail, and are also doubly linked with an alternate values, resulting in the tree structure.

Constructors

UndoTree.new()

Properties

current UndoHeader<E>?
The current entry on the tree.
no setter
entry → E?
The current E value of the tree.
no setter
hashCode int
The hash code for this object.
no setterinherited
The current head of the tree.
no setter
length int
The amount of Es contained in this tree.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tail UndoHeader<E>?
The current tail of the tree.
no setter

Methods

add(E entry) int
Add an entry to the tree, and return the index it will occupy.
canNextAlt() bool
Whether or not an nextAlt can be performed. This is the case when the tree is initialized and there is an nextAlt element.
canPrevAlt() bool
Whether or not an prevAlt can be performed. This is the case when the tree is initialized and there is an prevAlt element.
canRedo() bool
Whether or not an redo can be performed. This is the case when the tree is initialized and there is an next element.
canUndo() bool
Whether or not an undo can be performed. This is the case when the tree is initialized and there is an prev element.
nextAlt() → E?
Changes current to be nextAlt if possible, returning the new current if so, and null otherwise.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prevAlt() → E?
Changes current to be prevAlt if possible, returning the new current if so, and null otherwise.
redo() → E?
Changes current to be next if possible, returning the new current if so, and null otherwise.
toString() String
A string representation of this object.
inherited
undo() → E?
Changes current to be prev if possible, returning the previous current if so, and null otherwise.

Operators

operator ==(Object other) bool
The equality operator.
inherited