Package org.zkoss.pivot.impl
Class SimplePivotHeaderTree
java.lang.Object
org.zkoss.pivot.impl.SimplePivotHeaderTree
- All Implemented Interfaces:
PivotHeaderTree
A simple implementation of PivotHeaderTree
- Author:
- simonpai
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetDepth()Returns the depth of the tree.getRoot()Returns the root of the tree.voidsort()Sort the tree nodes by node keys, using natural ordering.voidsort(Comparator<PivotHeaderNode> comparator) Sort the tree nodes by node keys, using given comparator
-
Constructor Details
-
SimplePivotHeaderTree
Construct an empty tree- Parameters:
fields- the fields of each level
-
-
Method Details
-
sort
public void sort()Sort the tree nodes by node keys, using natural ordering. -
sort
Sort the tree nodes by node keys, using given comparator -
getDepth
public int getDepth()Description copied from interface:PivotHeaderTreeReturns the depth of the tree.- Specified by:
getDepthin interfacePivotHeaderTree
-
getRoot
Description copied from interface:PivotHeaderTreeReturns the root of the tree.- Specified by:
getRootin interfacePivotHeaderTree- See Also:
-