Interface TreeWithChildren<T,TR extends TreeWithChildren<T,TR>>

Type Parameters:
T - the generic type of the value from this tree data
TR - the generic type of the concrete data that will implement this interface
All Superinterfaces:
Treeable<T,TR>

public interface TreeWithChildren<T,TR extends TreeWithChildren<T,TR>> extends Treeable<T,TR>
The interface TreeWithChildren can keep information for a tree structure with its children.
  • Method Details

    • getChildren

      Collection<TR> getChildren()
      Gets the children of this tree node
      Returns:
      a collection with the children of this tree node
    • setChildren

      void setChildren(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