mondrian.rolap.agg
Class Aggregation.Axis

java.lang.Object
  extended by mondrian.rolap.agg.Aggregation.Axis
Enclosing class:
Aggregation

static class Aggregation.Axis
extends Object

 

Constructor Summary
Aggregation.Axis(StarColumnPredicate predicate)
          Creates an empty Axis.
Aggregation.Axis(StarColumnPredicate predicate, Comparable<?>[] keys)
          Creates an axis populated with a set of keys.
 
Method Summary
(package private)  boolean contains(Object key)
          Returns whether this axis contains a given key, or would contain it if it existed.
(package private)  Comparable<?>[] getKeys()
           
 int getMatchCount(StarColumnPredicate predicate)
          Returns how many of this Axis' keys match a given constraint.
(package private)  int getOffset(Comparable key)
           
(package private)  int getOffset(Object o)
           
(package private)  StarColumnPredicate getPredicate()
           
(package private)  int loadKeys(SortedSet<Comparable<?>> valueSet, boolean hasNull)
          Loads keys into the axis.
(package private) static Comparable wrap(Object o)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Aggregation.Axis

Aggregation.Axis(StarColumnPredicate predicate)
Creates an empty Axis.

Parameters:
predicate - Predicate defining which keys should appear on axis. (If a key passes the predicate but is not in the list, every cell with that key is assumed to have a null value.)

Aggregation.Axis

Aggregation.Axis(StarColumnPredicate predicate,
                 Comparable<?>[] keys)
Creates an axis populated with a set of keys.

Parameters:
predicate - Predicate defining which keys should appear on axis. (If a key passes the predicate but is not in the list, every cell with that key is assumed to have a null value.)
keys - Keys
Method Detail

getPredicate

StarColumnPredicate getPredicate()

getKeys

Comparable<?>[] getKeys()

loadKeys

int loadKeys(SortedSet<Comparable<?>> valueSet,
             boolean hasNull)
Loads keys into the axis.

Parameters:
valueSet - Set of distinct key values, sorted
hasNull - Whether the axis contains the null value, in addition to the values in valueSet
Returns:
Number of keys on axis

wrap

static final Comparable wrap(Object o)

getOffset

final int getOffset(Object o)

getOffset

final int getOffset(Comparable key)

contains

boolean contains(Object key)
Returns whether this axis contains a given key, or would contain it if it existed.

For example, if this axis is unconstrained, then this method returns true for any value.

Parameters:
key - Key
Returns:
Whether this axis would contain key

getMatchCount

public int getMatchCount(StarColumnPredicate predicate)
Returns how many of this Axis' keys match a given constraint.

Parameters:
predicate - Predicate
Returns:
How many keys match constraint

SourceForge.net_Logo