org.zkoss.pivot.impl
Class SimplePivotHeaderTree

java.lang.Object
  extended by org.zkoss.pivot.impl.SimplePivotHeaderTree
All Implemented Interfaces:
PivotHeaderTree

public class SimplePivotHeaderTree
extends java.lang.Object
implements PivotHeaderTree

A simple implementation of PivotHeaderTree

Author:
simonpai

Constructor Summary
SimplePivotHeaderTree(PivotField[] fields)
          Construct an empty tree
 
Method Summary
 int getDepth()
          Returns the depth of the tree.
 SimplePivotHeaderNode getRoot()
          Returns the root of the tree.
 void sort()
          Sort the tree nodes by node keys, using natural ordering.
 void sort(java.util.Comparator<PivotHeaderNode> comparator)
          Sort the tree nodes by node keys, using given comparator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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(java.util.Comparator<PivotHeaderNode> comparator)
Sort the tree nodes by node keys, using given comparator


getDepth

public int getDepth()
Description copied from interface: PivotHeaderTree
Returns the depth of the tree.

Specified by:
getDepth in interface PivotHeaderTree

getRoot

public SimplePivotHeaderNode getRoot()
Description copied from interface: PivotHeaderTree
Returns the root of the tree.

Specified by:
getRoot in interface PivotHeaderTree
See Also:
PivotHeaderNode


Copyright © 2013. All Rights Reserved.