Package mondrian.olap
Class Literal
- java.lang.Object
- 
- mondrian.olap.QueryPart
- 
- mondrian.olap.ExpBase
- 
- mondrian.olap.Literal
 
 
 
- 
- 
Field SummaryFields Modifier and Type Field Description intcategorystatic LiteraldoubleNegativeOnestatic LiteraldoubleOnestatic LiteraldoubleZerostatic LiteralemptyStringstatic LiteralnegativeOnestatic LiteralnullValuestatic Literalonestatic Literalzero
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Calcaccept(ExpCompiler compiler)Converts this expression into an a tree of expressions which can be efficiently evaluated.Objectaccept(MdxVisitor visitor)Accepts a visitor to this Exp.Expaccept(Validator validator)Validates this expression.Literalclone()static Literalcreate(Double d)Deprecated.static Literalcreate(Integer i)Deprecated.static Literalcreate(BigDecimal d)Creates a numeric literal.static LiteralcreateString(String s)Creates a string literal.static LiteralcreateSymbol(String s)Creates a symbol.intgetCategory()Returns theCategoryof the expression.intgetIntValue()TypegetType()Returns the type of this expression.ObjectgetValue()voidunparse(PrintWriter pw)Writes a string representation of this parse tree node to the given writer.- 
Methods inherited from class mondrian.olap.ExpBasecloneArray, getTypes, unparseList
 - 
Methods inherited from class mondrian.olap.QueryPartexplain, getChildren
 
- 
 
- 
- 
- 
Field Detail- 
categorypublic final int category 
 - 
nullValuepublic static final Literal nullValue 
 - 
emptyStringpublic static final Literal emptyString 
 - 
zeropublic static final Literal zero 
 - 
onepublic static final Literal one 
 - 
negativeOnepublic static final Literal negativeOne 
 - 
doubleZeropublic static final Literal doubleZero 
 - 
doubleOnepublic static final Literal doubleOne 
 - 
doubleNegativeOnepublic static final Literal doubleNegativeOne 
 
- 
 - 
Method Detail- 
createStringpublic static Literal createString(String s) Creates a string literal.- See Also:
- createSymbol(java.lang.String)
 
 - 
createSymbolpublic static Literal createSymbol(String s) Creates a symbol.- See Also:
- createString(java.lang.String)
 
 - 
createpublic static Literal create(BigDecimal d) Creates a numeric literal.Using a BigDecimalallows us to store the precise value that the user typed. We will have to fit the value into a nativedoubleorintlater on, but parse time is not the time to be throwing away information.
 - 
clonepublic Literal clone() 
 - 
unparsepublic void unparse(PrintWriter pw) Description copied from class:QueryPartWrites a string representation of this parse tree node to the given writer.
 - 
getCategorypublic int getCategory() Description copied from interface:ExpReturns theCategoryof the expression.
 - 
getTypepublic Type getType() Description copied from interface:ExpReturns the type of this expression. Never null.
 - 
acceptpublic Exp accept(Validator validator) Description copied from interface:ExpValidates this expression. The validator acts in the role of 'visitor' (see Gang of Four 'visitor pattern'), and an expression in the role of 'visitee'.- Parameters:
- validator- Validator contains validation context
- Returns:
- The validated expression; often but not always the same as this expression
 
 - 
acceptpublic Calc accept(ExpCompiler compiler) Description copied from interface:ExpConverts this expression into an a tree of expressions which can be efficiently evaluated.
 - 
acceptpublic Object accept(MdxVisitor visitor) Description copied from interface:ExpAccepts a visitor to this Exp. The implementation should generally dispatches to theMdxVisitor.visit(mondrian.olap.Query)method appropriate to the type of expression.- Parameters:
- visitor- Visitor
 
 - 
getValuepublic Object getValue() 
 - 
getIntValuepublic int getIntValue() 
 
- 
 
-