Package org.arakhne.afc.math.tree
Interface IterableNode<N extends IterableNode<?>>
-
- Type Parameters:
N- is the type of the tree nodes.
- All Known Subinterfaces:
GISTreeNode<P,N>,TreeNode<D,N>
- All Known Implementing Classes:
AbstractGISTreeSetNode,AbstractParentlessTreeNode,AbstractTreeNode,BinaryTreeNode,BinaryTreeNode.DefaultBinaryTreeNode,ConstantNaryTreeNode,ConstantNaryTreeNode.DefaultConstantNaryTreeNode,GISTreeSetNode,IcosepBinaryTreeNode,IcosepBinaryTreeNode.DefaultIcosepBinaryTreeNode,IcosepOctTreeNode,IcosepOctTreeNode.DefaultIcosepOctTreeNode,IcosepQuadTreeNode,IcosepQuadTreeNode.DefaultIcosepQuadTreeNode,NaryTreeNode,NaryTreeNode.DefaultNaryTreeNode,OctTreeNode,OctTreeNode.DefaultOctTreeNode,PentaTreeNode,PentaTreeNode.DefaultPentaTreeNode,QuadTreeNode,QuadTreeNode.DefaultQuadTreeNode,TernaryTreeNode,TernaryTreeNode.DefaultTernaryTreeNode,UnsupportedOperationTreeNode,WeakGISTreeSetNode
public interface IterableNode<N extends IterableNode<?>>This interface is used to specify the base functions of a tree node which is usable by an tree iterator.- Since:
- 13.0
- Version:
- 17.0 2020-01-04 14:41:41
- Author:
- Stéphane GALLAND
- Maven Group Id:
- org.arakhne.afc.core
- Maven Artifact Id:
- mathtree
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NgetChildAt(int index)Replies the n-th child in this node.intgetChildCount()Replies count of children in this node.intgetNotNullChildCount()Replies count of not-null children in this node.booleanisLeaf()Replies if this node is a leaf.NremoveFromParent()Remove this node from its parent.
-
-
-
Method Detail
-
getChildCount
@Pure int getChildCount()
Replies count of children in this node.The number of children is greater or equal to the value replied by
getNotNullChildCount().- Returns:
- the count of children.
- See Also:
getNotNullChildCount()
-
getNotNullChildCount
@Pure int getNotNullChildCount()
Replies count of not-null children in this node.The number of not-null children is lower or equal to the value replied by
getChildCount().- Returns:
- the count of not-null children.
- See Also:
getChildCount()
-
getChildAt
@Pure N getChildAt(int index) throws IndexOutOfBoundsException
Replies the n-th child in this node.- Parameters:
index- is the index of the child to reply- Returns:
- the child node.
- Throws:
IndexOutOfBoundsException- if the given index was invalid
-
isLeaf
@Pure boolean isLeaf()
Replies if this node is a leaf.- Returns:
trueis this node is a leaf, otherwisefalse
-
removeFromParent
N removeFromParent()
Remove this node from its parent.- Returns:
- the parent node from which the node was removed.
-
-