Class NumericDefaultExpression
java.lang.Object
com.google.appengine.api.search.dev.Expression
com.google.appengine.api.search.dev.NumericDefaultExpression
Numeric expression which evaluates to default value if the child expression
cannot be evaluated.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.appengine.api.search.dev.Expression
Expression.Sorter -
Constructor Summary
ConstructorsConstructorDescriptionNumericDefaultExpression(com.google.appengine.api.search.dev.NumericExpression expression, Double defaultValue) -
Method Summary
Modifier and TypeMethodDescriptioncom.google.apphosting.api.search.DocumentPb.FieldValueeval(org.apache.lucene.document.Document doc) Evaluate the expression to field value proto for the specified document.doubleevalDouble(org.apache.lucene.document.Document doc) Evaluate double value from specified document.getNumericSorter(int sign, double defaultValueNumeric) getSorters(int sign, double defaultValueNumeric, String defaultValueText) Get list of sort classes for the expression.Methods inherited from class com.google.appengine.api.search.dev.Expression
makeValue
-
Constructor Details
-
NumericDefaultExpression
public NumericDefaultExpression(com.google.appengine.api.search.dev.NumericExpression expression, Double defaultValue)
-
-
Method Details
-
evalDouble
Evaluate double value from specified document.- Throws:
EvaluationException
-
eval
public com.google.apphosting.api.search.DocumentPb.FieldValue eval(org.apache.lucene.document.Document doc) throws EvaluationException Description copied from class:ExpressionEvaluate the expression to field value proto for the specified document.- Specified by:
evalin classExpression- Throws:
EvaluationException
-
getSorters
public List<Expression.Sorter> getSorters(int sign, double defaultValueNumeric, String defaultValueText) Description copied from class:ExpressionGet list of sort classes for the expression. Usually it contains just one element, but for field expressions it can potentially return 2 sorters when both numeric and text fields exist with a field name.- Specified by:
getSortersin classExpression
-
getNumericSorter
-