|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmondrian.calc.impl.AbstractCalc
mondrian.calc.impl.GenericCalc
public abstract class GenericCalc
Adapter which computes an expression and converts it to any required type.
Field Summary |
---|
Fields inherited from class mondrian.calc.impl.AbstractCalc |
---|
exp, type |
Constructor Summary | |
---|---|
protected |
GenericCalc(Exp exp)
|
Method Summary | |
---|---|
boolean |
evaluateBoolean(Evaluator evaluator)
Evaluates this expression to yield a boolean value. |
Date |
evaluateDateTime(Evaluator evaluator)
Evaluates this expression to yield a Date value. |
Dimension |
evaluateDimension(Evaluator evaluator)
Evaluates this expression to yield a dimension. |
double |
evaluateDouble(Evaluator evaluator)
Evaluates this expression to yield a double value. |
Hierarchy |
evaluateHierarchy(Evaluator evaluator)
Evaluates this expression to yield a hierarchy. |
int |
evaluateInteger(Evaluator evaluator)
Evaluates this expression to yield an int value. |
Iterable |
evaluateIterable(Evaluator evaluator)
Evaluates an expression to yield an Iterable of members or tuples. |
Level |
evaluateLevel(Evaluator evaluator)
Evaluates this expression to yield a level. |
List |
evaluateList(Evaluator evaluator)
Evaluates an expression to yield a list of members or tuples. |
Member |
evaluateMember(Evaluator evaluator)
Evaluates this expression to yield a member. |
String |
evaluateString(Evaluator evaluator)
Evaluates this expression to yield a String value. |
Member[] |
evaluateTuple(Evaluator evaluator)
Evaluates this expression to yield a tuple. |
void |
evaluateVoid(Evaluator evaluator)
|
static double |
numberToDouble(Number number)
|
Methods inherited from class mondrian.calc.impl.AbstractCalc |
---|
accept, anyDepends, anyDependsButFirst, butDepends, dependsOn, getArguments, getCalcs, getName, getResultStyle, getType, simplifyEvaluator |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Methods inherited from interface mondrian.calc.Calc |
---|
accept, dependsOn, evaluate, getResultStyle, getType |
Constructor Detail |
---|
protected GenericCalc(Exp exp)
Method Detail |
---|
public List evaluateList(Evaluator evaluator)
ListCalc
The list is immutable if Calc.getResultStyle()
yields
ResultStyle.MUTABLE_LIST
. Otherwise,
the caller must not modify the list.
evaluateList
in interface ListCalc
evaluator
- Evaluation context
public Iterable evaluateIterable(Evaluator evaluator)
IterCalc
The Iterable is immutable.
evaluateIterable
in interface IterCalc
evaluator
- Evaluation context
public Member[] evaluateTuple(Evaluator evaluator)
TupleCalc
A tuple cannot contain any null members. If any of the members is null, this method must return a null.
evaluateTuple
in interface TupleCalc
evaluator
- Evaluation context
public String evaluateString(Evaluator evaluator)
StringCalc
String
value.
evaluateString
in interface StringCalc
evaluator
- Evaluation context
public int evaluateInteger(Evaluator evaluator)
IntegerCalc
int
value.
If the result is null, returns the special
FunUtil.IntegerNull
value.
evaluateInteger
in interface IntegerCalc
evaluator
- Evaluation context
public double evaluateDouble(Evaluator evaluator)
DoubleCalc
double
value.
If the result is null, returns the special
FunUtil.DoubleNull
value.
evaluateDouble
in interface DoubleCalc
evaluator
- Evaluation context
public static double numberToDouble(Number number)
public boolean evaluateBoolean(Evaluator evaluator)
BooleanCalc
boolean
value.
If the result is null, returns the special
FunUtil.BooleanNull
value.
evaluateBoolean
in interface BooleanCalc
evaluator
- Evaluation context
public Date evaluateDateTime(Evaluator evaluator)
DateTimeCalc
Date
value.
evaluateDateTime
in interface DateTimeCalc
evaluator
- Evaluation context
public void evaluateVoid(Evaluator evaluator)
evaluateVoid
in interface VoidCalc
public Member evaluateMember(Evaluator evaluator)
MemberCalc
May return the null member (see
Hierarchy.getNullMember()
) but never null.
evaluateMember
in interface MemberCalc
evaluator
- Evaluation context
public Level evaluateLevel(Evaluator evaluator)
LevelCalc
Never returns null.
evaluateLevel
in interface LevelCalc
evaluator
- Evaluation context
public Hierarchy evaluateHierarchy(Evaluator evaluator)
HierarchyCalc
Never returns null.
evaluateHierarchy
in interface HierarchyCalc
evaluator
- Evaluation context
public Dimension evaluateDimension(Evaluator evaluator)
DimensionCalc
Never returns null.
evaluateDimension
in interface DimensionCalc
evaluator
- Evaluation context
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |