Interface TreeWithChildren<T,TR extends TreeWithChildren>
-
- 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>
public interface TreeWithChildren<T,TR extends TreeWithChildren> extends Treeable<T,TR>
The interfaceTreeWithChildren
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addChild(TR child)
Adds the given child to the children collectionjava.util.Collection<TR>
getChildren()
Gets the children of this tree nodevoid
removeChild(TR child)
Removes the given child from the children collectionvoid
setChildren(java.util.Collection<TR> children)
Sets the children of this tree node
-
-
-
Method Detail
-
getChildren
java.util.Collection<TR> getChildren()
Gets the children of this tree node- Returns:
- a collection with the children of this tree node
-
setChildren
void setChildren(java.util.Collection<TR> children)
Sets the children of this tree node- Parameters:
children
- the new children
-
addChild
void addChild(TR child)
Adds the given child to the children collection- Parameters:
child
- the child to add
-
removeChild
void removeChild(TR child)
Removes the given child from the children collection- Parameters:
child
- the child to remove
-
-