Package org.javarosa.xpath.expr
Class XPathBinaryOpExpr
java.lang.Object
org.javarosa.xpath.expr.XPathExpression
org.javarosa.xpath.expr.XPathOpExpr
org.javarosa.xpath.expr.XPathBinaryOpExpr
- All Implemented Interfaces:
Serializable,Externalizable
- Direct Known Subclasses:
XPathArithExpr,XPathBoolExpr,XPathCmpExpr,XPathEqExpr,XPathUnionExpr
public abstract class XPathBinaryOpExpr extends XPathOpExpr
- See Also:
- Serialized Form
-
Field Summary
Fields Modifier and Type Field Description XPathExpressionaXPathExpressionb -
Constructor Summary
Constructors Constructor Description XPathBinaryOpExpr()XPathBinaryOpExpr(XPathExpression a, XPathExpression b) -
Method Summary
Modifier and Type Method Description booleanequals(Object o)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(String op)voidwriteExternal(DataOutputStream out)Methods inherited from class org.javarosa.xpath.expr.XPathExpression
eval, eval, hashCode, pivot, print, printParseTree
-
Field Details
-
Constructor Details
-
XPathBinaryOpExpr
public XPathBinaryOpExpr() -
XPathBinaryOpExpr
-
-
Method Details
-
toString
-
equals
-
readExternal
public void readExternal(DataInputStream in, PrototypeFactory pf) throws IOException, DeserializationException- Throws:
IOExceptionDeserializationException
-
writeExternal
- 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 classXPathExpression- 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
-