Package org.javarosa.xpath.expr
Class XPathCmpExpr
java.lang.Object
org.javarosa.xpath.expr.XPathExpression
org.javarosa.xpath.expr.XPathOpExpr
org.javarosa.xpath.expr.XPathBinaryOpExpr
org.javarosa.xpath.expr.XPathCmpExpr
- All Implemented Interfaces:
Serializable,Externalizable
public class XPathCmpExpr extends XPathBinaryOpExpr
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description XPathCmpExpr()XPathCmpExpr(int op, XPathExpression a, XPathExpression b) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)Objecteval(DataInstance model, EvaluationContext evalContext)Objectpivot(DataInstance model, EvaluationContext evalContext, List<Object> pivots, Object sentinal)Pivot this expression, returning values if appropriate, and adding any pivots to the list.voidreadExternal(DataInputStream in, PrototypeFactory pf)StringtoString()voidwriteExternal(DataOutputStream out)Methods inherited from class org.javarosa.xpath.expr.XPathExpression
eval, hashCode, pivot, print, printParseTree
-
Field Details
-
LT
public static final int LT- See Also:
- Constant Field Values
-
GT
public static final int GT- See Also:
- Constant Field Values
-
LTE
public static final int LTE- See Also:
- Constant Field Values
-
GTE
public static final int GTE- See Also:
- Constant Field Values
-
op
public int op
-
-
Constructor Details
-
XPathCmpExpr
public XPathCmpExpr() -
XPathCmpExpr
-
-
Method Details
-
eval
- Specified by:
evalin classXPathExpression
-
toString
-
equals
- Overrides:
equalsin classXPathBinaryOpExpr
-
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classXPathBinaryOpExpr- Throws:
IOExceptionDeserializationException
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classXPathBinaryOpExpr- Throws:
IOException
-
pivot
public Object pivot(DataInstance model, EvaluationContext evalContext, List<Object> pivots, Object sentinal) throws UnpivotableExpressionExceptionDescription copied from class:XPathExpressionPivot this expression, returning values if appropriate, and adding any pivots to the list.- Overrides:
pivotin classXPathBinaryOpExpr- Parameters:
model- The model to evaluate the current expression againstevalContext- The evaluation context to evaluate againstpivots- The list of pivot points in the xpath being evaluated. Pivots should be added to this list.sentinal- The value which is being pivoted around.- Returns:
- null - If a pivot was identified in this expression sentinal - If the current expression represents the sentinal being pivoted any other value - The result of the expression if no pivots are detected
- Throws:
UnpivotableExpressionException- If the expression is too complex to pivot
-