@PublicApi public class NodeZipper<T> extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
NodeZipper.ModificationType |
Constructor and Description |
---|
NodeZipper(T curNode,
java.util.List<Breadcrumb<T>> breadcrumbs,
NodeAdapter<T> nodeAdapter) |
NodeZipper(T curNode,
java.util.List<Breadcrumb<T>> breadcrumbs,
NodeAdapter<T> nodeAdapter,
NodeZipper.ModificationType modificationType) |
Modifier and Type | Method and Description |
---|---|
NodeZipper<T> |
deleteNode() |
java.util.List<Breadcrumb<T>> |
getBreadcrumbs() |
T |
getCurNode() |
NodeZipper.ModificationType |
getModificationType() |
T |
getParent() |
NodeZipper<T> |
insertAfter(T toInsertAfter) |
NodeZipper<T> |
insertBefore(T toInsertBefore) |
NodeZipper<T> |
modifyNode(java.util.function.Function<T,T> transform) |
NodeZipper<T> |
moveUp() |
static <T> NodeZipper<T> |
rootZipper(T rootNode,
NodeAdapter<T> nodeAdapter) |
T |
toRoot() |
java.lang.String |
toString() |
NodeZipper<T> |
withNewNode(T newNode) |
public NodeZipper(T curNode, java.util.List<Breadcrumb<T>> breadcrumbs, NodeAdapter<T> nodeAdapter)
public NodeZipper(T curNode, java.util.List<Breadcrumb<T>> breadcrumbs, NodeAdapter<T> nodeAdapter, NodeZipper.ModificationType modificationType)
public NodeZipper.ModificationType getModificationType()
public T getCurNode()
public java.util.List<Breadcrumb<T>> getBreadcrumbs()
public T getParent()
public static <T> NodeZipper<T> rootZipper(T rootNode, NodeAdapter<T> nodeAdapter)
public NodeZipper<T> modifyNode(java.util.function.Function<T,T> transform)
public NodeZipper<T> deleteNode()
public NodeZipper<T> insertAfter(T toInsertAfter)
public NodeZipper<T> insertBefore(T toInsertBefore)
public NodeZipper<T> withNewNode(T newNode)
public NodeZipper<T> moveUp()
public T toRoot()
public java.lang.String toString()
toString
in class java.lang.Object