Interface Treeable<T,TR extends Treeable>
-
- 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>
The interfaceTreeable
can keep information for a tree structure.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
COLUMN_NAME_DEPTH
The Constant for the column name 'depth'.static java.lang.String
COLUMN_NAME_NODE
The Constant for the column name 'node'.static java.lang.String
COLUMN_NAME_PARENT
The Constant for the column name 'parent'.static java.lang.String
COLUMN_NAME_VALUE
The Constant for the column name 'value'.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getDepth()
Gets the depth of this tree nodeTR
getParent()
Gets the parent of this tree nodeT
getValue()
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
setParent(TR parent)
Sets the parent of this tree nodevoid
setValue(T value)
Sets the value
-
-
-
Field Detail
-
COLUMN_NAME_DEPTH
static final java.lang.String COLUMN_NAME_DEPTH
The Constant for the column name 'depth'.- See Also:
- Constant Field Values
-
COLUMN_NAME_NODE
static final java.lang.String COLUMN_NAME_NODE
The Constant for the column name 'node'.- See Also:
- Constant Field Values
-
COLUMN_NAME_PARENT
static final java.lang.String COLUMN_NAME_PARENT
The Constant for the column name 'parent'.- See Also:
- Constant Field Values
-
COLUMN_NAME_VALUE
static final java.lang.String COLUMN_NAME_VALUE
The Constant for the column name 'value'.- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
-