Constructor | Description |
---|---|
TreeNodeImpl(N parent,
String name) |
This is the initial value constructor.
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
addChild(N child) |
This method is used to add children to a parent node in the constructor.
|
List<N> |
getChildren() |
This method returns the children which are contained in the node.
|
Set<TreeLink<N>> |
getEdges() |
This method returns the edges which are bound to the vertex.
|
String |
getName() |
This method returns the node identifier.
|
N |
getParent() |
This method returns the parent node.
|
boolean |
hasChildren() |
This method returns whether or not the current node contains children.
|
Iterator<N> |
iterator() |
forEach, spliterator
protected void addChild(N child)
child
- is the child to be added to the children
list.public N getParent()
TreeNode
public boolean hasChildren()
TreeNode
hasChildren
in interface TreeNode<N extends TreeNodeImpl<N>>
true
is returned in case the node contains children.
false
is returned otherwise.public List<N> getChildren()
TreeNode
getChildren
in interface TreeNode<N extends TreeNodeImpl<N>>
List
of T is returned. If not child is found this list is
empty. The return value must not be null
.public Set<TreeLink<N>> getEdges()
Vertex
public String getName()
TreeNode
TreeNode
may have other values, too.Copyright © 2014–2018 PureSol Technologies. All rights reserved.