Package org.zkoss.pivot.impl
Class SimplePivotHeaderTree
- java.lang.Object
-
- org.zkoss.pivot.impl.SimplePivotHeaderTree
-
- All Implemented Interfaces:
PivotHeaderTree
public class SimplePivotHeaderTree extends Object implements PivotHeaderTree
A simple implementation of PivotHeaderTree- Author:
- simonpai
-
-
Constructor Summary
Constructors Constructor Description SimplePivotHeaderTree(PivotField[] fields)Construct an empty tree
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDepth()Returns the depth of the tree.SimplePivotHeaderNodegetRoot()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 Detail
-
SimplePivotHeaderTree
public SimplePivotHeaderTree(PivotField[] fields)
Construct an empty tree- Parameters:
fields- the fields of each level
-
-
Method Detail
-
sort
public void sort()
Sort the tree nodes by node keys, using natural ordering.
-
sort
public void sort(Comparator<PivotHeaderNode> comparator)
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
public SimplePivotHeaderNode getRoot()
Description copied from interface:PivotHeaderTreeReturns the root of the tree.- Specified by:
getRootin interfacePivotHeaderTree- See Also:
PivotHeaderNode
-
-