com.google.appengine.api.search.dev
Class NumericDefaultExpression
java.lang.Object
com.google.appengine.api.search.dev.Expression
com.google.appengine.api.search.dev.NumericDefaultExpression
public class NumericDefaultExpression
- extends Expression
Numeric expression which evaluates to default value if the child expression
cannot be evaluated.
Constructor Summary |
NumericDefaultExpression(com.google.appengine.api.search.dev.NumericExpression expression,
java.lang.Double defaultValue)
|
Method Summary |
FieldValue |
eval(Document doc)
Evaluate the expression to field value proto for the specified document. |
double |
evalDouble(Document doc)
Evaluate double value from specified document. |
Expression.Sorter |
getNumericSorter(int sign,
double defaultValueNumeric)
|
java.util.List<Expression.Sorter> |
getSorters(int sign,
double defaultValueNumeric,
java.lang.String defaultValueText)
Get list of sort classes for the expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NumericDefaultExpression
public NumericDefaultExpression(com.google.appengine.api.search.dev.NumericExpression expression,
java.lang.Double defaultValue)
evalDouble
public double evalDouble(Document doc)
throws EvaluationException
- Evaluate double value from specified document.
- Throws:
EvaluationException
eval
public FieldValue eval(Document doc)
throws EvaluationException
- Description copied from class:
Expression
- Evaluate the expression to field value proto for the specified document.
- Specified by:
eval
in class Expression
- Throws:
EvaluationException
getSorters
public java.util.List<Expression.Sorter> getSorters(int sign,
double defaultValueNumeric,
java.lang.String defaultValueText)
- Description copied from class:
Expression
- Get 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:
getSorters
in class Expression
getNumericSorter
public Expression.Sorter getNumericSorter(int sign,
double defaultValueNumeric)