Class AbstractTreeModel<N,T extends AbstractTreeModel<N,T>>
java.lang.Object
overit.geocallapp.utilities.treemodel.AbstractTreeModel<N,T>
- Type Parameters:
N- the number typeT- the generic type
- Direct Known Subclasses:
TreeModel,UXTreeModel
The Class that defines the abstract tree model.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddChildren(List<T> children) voidaddSiblingAfter(T sibling) voidaddSiblingBefore(T sibling) findByNodeFilter(Predicate<N> filter) findNodeByNodeFilter(Predicate<N> filter) findNodesByFilter(Predicate<N> filter) intgetChildIndex(T child) getChildrenByNodeFilter(Predicate<N> filter) intgetDepth()getNode()getNodesMap(Function<N, K> keyFunction) getRoot()booleanhasNode()booleanisAncestorOf(T treeModel, boolean itselfAsAncestor) booleanbooleanisDescendantOf(T treeModel, boolean itselfAsDescendant) booleanbooleanbooleanisLeaf()booleanisRoot()voidremoveChild(T child) voidremoveChildren(List<T> children) voidvoidprotected voidvoidswapChild(int currentChildIndex, int newChildIndex)
-
Constructor Details
-
AbstractTreeModel
public AbstractTreeModel()
-
-
Method Details
-
getNode
-
setNode
-
hasNode
public boolean hasNode() -
getParent
-
setParent
-
getChildren
-
getChildrenByNodeFilter
-
isChild
-
addChild
-
addChildren
-
addChild
-
addSiblingBefore
-
addSiblingAfter
-
getChildIndex
-
swapChild
public void swapChild(int currentChildIndex, int newChildIndex) -
removeChild
-
removeChildren
-
removeFromParent
public void removeFromParent() -
isRoot
public boolean isRoot() -
isLeaf
public boolean isLeaf() -
isAncestorOf
-
isDescendantOf
-
isFirstChild
public boolean isFirstChild() -
isLastChild
public boolean isLastChild() -
getRoot
-
getDepth
public int getDepth() -
bfsStream
-
dfsStream
-
ancestorsStream
-
ascendingStream
-
getDfsNodes
-
getNodesMap
-
findByNodeFilter
-
findNodesByFilter
-
findNodeByNodeFilter
-