public class Trees extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
Trees.NodeRunner |
static class |
Trees.TreeTravCtx |
Constructor and Description |
---|
Trees() |
Modifier and Type | Method and Description |
---|---|
static Calculator |
getCalculator(PivotField field,
int index)
Retrieves the Calculator from a field by index.
|
static Calculator |
getCalculator(PivotHeaderNode node,
int index)
Retrieves the Calculator from a node by index.
|
static Object |
getKey(PivotField field,
Object value)
Returns the key defined by GroupHandler on the field, if any.
|
static PivotHeaderNode |
getNode(PivotHeaderTree tree,
int[] indicies)
Seek down PivotHeaderNode by indices.
|
static PivotHeaderNode |
getNode(PivotHeaderTree tree,
Object[] keys)
Seek down PivotHeaderNode based on keys.
|
static int |
getSize(PivotHeaderTree tree)
Compute the size of tree.
|
static int |
getSize(PivotHeaderTree tree,
boolean open)
Compute the size of tree.
|
static int |
getSubtotalCount(PivotField field)
Return the count of subtotal Calculators on a field
|
static int |
getSubtotalCount(PivotHeaderNode node)
Return the count of subtotal Calculators on a node
|
static int |
getSubtotalCount(PivotHeaderNode node,
boolean open)
Return the count of subtotal Calculators on a node
|
static boolean |
isRoot(PivotHeaderNode node)
Return true if node is root.
|
static boolean |
isTerminal(PivotHeaderNode node)
Return true if node is leaf or closed.
|
static void |
openDown(PivotHeaderNode node,
boolean open)
Recursively set open or close to a node and all its descendants.
|
static void |
traverse(PivotHeaderTree tree,
boolean asIfOpenAll,
int offset,
int limit,
Trees.NodeRunner runner)
Traverse the tree in a depth first, children first fashion, while concern
paging.
|
static void |
traverse(PivotHeaderTree tree,
boolean open,
Trees.NodeRunner runner)
Traverse the tree in a depth first, children first fashion.
|
static void |
traverse(PivotHeaderTree tree,
Trees.NodeRunner runner)
Traverse the tree in a depth first, children first fashion.
|
public static int getSubtotalCount(PivotHeaderNode node)
public static int getSubtotalCount(PivotHeaderNode node, boolean open)
open
- compute as if the node were always open.public static int getSubtotalCount(PivotField field)
public static Calculator getCalculator(PivotHeaderNode node, int index)
public static Calculator getCalculator(PivotField field, int index)
public static Object getKey(PivotField field, Object value)
public static int getSize(PivotHeaderTree tree)
public static int getSize(PivotHeaderTree tree, boolean open)
open
- compute as if all nodes were openpublic static boolean isTerminal(PivotHeaderNode node)
public static boolean isRoot(PivotHeaderNode node)
public static PivotHeaderNode getNode(PivotHeaderTree tree, Object[] keys)
public static PivotHeaderNode getNode(PivotHeaderTree tree, int[] indicies)
public static void openDown(PivotHeaderNode node, boolean open)
public static void traverse(PivotHeaderTree tree, Trees.NodeRunner runner)
public static void traverse(PivotHeaderTree tree, boolean open, Trees.NodeRunner runner)
open
- traverse as if all nodes were open.public static void traverse(PivotHeaderTree tree, boolean asIfOpenAll, int offset, int limit, Trees.NodeRunner runner)
asIfOpenAll
- traverse as if all nodes were open.offset
- limit
- no limit if negativeCopyright © 2017. All rights reserved.