Package org.jline.reader.impl
Class UndoTree<T>
- java.lang.Object
-
- org.jline.reader.impl.UndoTree<T>
-
public class UndoTree<T> extends java.lang.ObjectSimple undo tree. Note that the first added state can't be undone
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classUndoTree.Node
-
Field Summary
Fields Modifier and Type Field Description private UndoTree.Nodecurrentprivate UndoTree.Nodeparentprivate java.util.function.Consumer<T>state
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRedo()booleancanUndo()voidclear()voidnewState(T state)voidredo()voidundo()
-
-
-
Field Detail
-
state
private final java.util.function.Consumer<T> state
-
parent
private final UndoTree.Node parent
-
current
private UndoTree.Node current
-
-
Constructor Detail
-
UndoTree
public UndoTree(java.util.function.Consumer<T> s)
-
-
Method Detail
-
clear
public void clear()
-
newState
public void newState(T state)
-
canUndo
public boolean canUndo()
-
canRedo
public boolean canRedo()
-
undo
public void undo()
-
redo
public void redo()
-
-