mondrian.rolap.agg
Class Segment.Region
java.lang.Object
mondrian.rolap.agg.Segment.Region
- Enclosing class:
- Segment
static class Segment.Region
- extends Object
Definition of a region of values which are not in a segment.
A region is defined by a set of constraints, one for each column
in the segment. A constraint may be
LiteralStarPredicate
(true), meaning that
the column is unconstrained.
For example,
segment (State={CA, OR, WA}, Gender=*)
actual values {1997, 1998} * {CA, OR, WA} * {M, F} = 12 cells
excluded region (Year=*, State={CA, OR}, Gender={F})
excluded values {1997, 1998} * {CA, OR} * {F} = 4 cells
Values:
F M
CA out in
OR out in
WA in in
Note that the resulting segment is not a hypercube: it has a 'hole'.
This is why regions are required.
-
-
Segment.Region
Segment.Region(List<StarColumnPredicate> predicateList,
List<StarPredicate> multiColumnPredicateList,
int cellCount)
getPredicates
public List<StarColumnPredicate> getPredicates()
getMultiColumnPredicates
public List<StarPredicate> getMultiColumnPredicates()
getCellCount
public int getCellCount()
wouldContain
public boolean wouldContain(Object[] keys)
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
describe
public void describe(StringBuilder buf)
- Describes this Segment.
- Parameters:
buf
- Buffer to write to.