Interface Treeable<T,TR extends Treeable<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 Known Subinterfaces:
IdentifiableTreeable<PK,T,TR>, IdentifiableTreeableVersionable<PK,T,TR>, TreeWithChildren<T,TR>

public interface Treeable<T,TR extends Treeable<T,TR>>
The interface Treeable can keep information for a tree structure.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The Constant for the column name 'depth'.
    static final String
    The Constant for the column name 'node'.
    static final String
    The Constant for the column name 'parent'.
    static final String
    The Constant for the column name 'value'.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets the depth of this tree node
    Gets the parent of this tree node
    Gets the value
    boolean
    Checks if this is a node or a leaf
    void
    setDepth(int depth)
    Sets the new depth of this tree node
    void
    setNode(boolean node)
    Sets the node flag
    void
    setParent(TR parent)
    Sets the parent of this tree node
    void
    setValue(T value)
    Sets the value
  • Field Details

  • Method Details

    • getDepth

      int getDepth()
      Gets the depth of this tree node
      Returns:
      the depth of this tree node
    • setDepth

      void setDepth(int depth)
      Sets the new depth of this tree node
      Parameters:
      depth - the new depth
    • getParent

      TR getParent()
      Gets the parent of this tree node
      Returns:
      the parent of this tree node
    • setParent

      void setParent(TR parent)
      Sets the parent of this tree node
      Parameters:
      parent - the new parent of this tree node
    • getValue

      T getValue()
      Gets the value
      Returns:
      the value
    • setValue

      void setValue(T value)
      Sets the value
      Parameters:
      value - the new value
    • isNode

      boolean isNode()
      Checks if this is a node or a leaf
      Returns:
      true, if it is a node otherwise false if it is a leaf
    • setNode

      void setNode(boolean node)
      Sets the node flag
      Parameters:
      node - the new node flag