Top Description Inners Fields Constructors Methods
jdk.internal.org.jline.reader.impl

public Class UndoTree<T>

extends Object
Class Inheritance
Imports
java.util.function.Consumer

Simple undo tree. Note that the first added state can't be undone

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class

Field Summary

Modifier and TypeField and Description
private UndoTree<T>.Node
private final UndoTree<T>.Node
private final Consumer<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public void
public void
newState(T state)

public void
redo()

public void
undo()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

currentback to summary
private UndoTree<T>.Node current
parentback to summary
private final UndoTree<T>.Node parent
stateback to summary
private final Consumer<T> state

Constructor Detail

UndoTreeback to summary
public UndoTree(Consumer<T> s)
Annotations
@SuppressWarnings:this-escape

Method Detail

canRedoback to summary
public boolean canRedo()
canUndoback to summary
public boolean canUndo()
clearback to summary
public void clear()
newStateback to summary
public void newState(T state)
redoback to summary
public void redo()
undoback to summary
public void undo()
jdk.internal.org.jline.reader.impl back to summary

private Class UndoTree.Node

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private UndoTree<T>.Node
private UndoTree<T>.Node
private final T

Constructor Summary

AccessConstructor and Description
public
Node(T s)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

leftback to summary
private UndoTree<T>.Node left
rightback to summary
private UndoTree<T>.Node right
stateback to summary
private final T state

Constructor Detail

Nodeback to summary
public Node(T s)