Interface Treeable<T,TR extends Treeable<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 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 -
Method Summary
Modifier and TypeMethodDescriptionint
getDepth()
Gets the depth of this tree nodeGets the parent of this tree nodegetValue()
Gets the valueboolean
isNode()
Checks if this is a node or a leafvoid
setDepth
(int depth) Sets the new depth of this tree nodevoid
setNode
(boolean node) Sets the node flagvoid
Sets the parent of this tree nodevoid
Sets the value
-
Field Details
-
COLUMN_NAME_DEPTH
The Constant for the column name 'depth'.- See Also:
-
COLUMN_NAME_NODE
The Constant for the column name 'node'.- See Also:
-
COLUMN_NAME_PARENT
The Constant for the column name 'parent'.- See Also:
-
COLUMN_NAME_VALUE
The Constant for the column name 'value'.- See Also:
-
-
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
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
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
-