Interface TreeWithChildren<T,TR extends TreeWithChildren<T,TR>>
- Type Parameters:
T
- the generic type of the value from this tree dataTR
- the generic type of the concrete data that will implement this interface
- All Superinterfaces:
Treeable<T,
TR>
The interface
TreeWithChildren
can keep information for a tree structure with its
children.-
Field Summary
Fields inherited from interface io.github.astrapi69.data.treeable.Treeable
COLUMN_NAME_DEPTH, COLUMN_NAME_NODE, COLUMN_NAME_PARENT, COLUMN_NAME_VALUE
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given child to the children collectionGets the children of this tree nodevoid
removeChild
(TR child) Removes the given child from the children collectionvoid
setChildren
(Collection<TR> children) Sets the children of this tree node
-
Method Details
-
getChildren
Collection<TR> getChildren()Gets the children of this tree node- Returns:
- a collection with the children of this tree node
-
setChildren
Sets the children of this tree node- Parameters:
children
- the new children
-
addChild
Adds the given child to the children collection- Parameters:
child
- the child to add
-
removeChild
Removes the given child from the children collection- Parameters:
child
- the child to remove
-