Package org.apache.jena.sparql.expr
Class ExprFunction2
- java.lang.Object
-
- org.apache.jena.sparql.expr.ExprNode
-
- org.apache.jena.sparql.expr.ExprFunction
-
- org.apache.jena.sparql.expr.ExprFunction2
-
- All Implemented Interfaces:
Expr
- Direct Known Subclasses:
E_Add,E_Cast,E_Divide,E_Equals,E_GreaterThan,E_GreaterThanOrEqual,E_LangMatches,E_LessThan,E_LessThanOrEqual,E_LogicalAnd,E_LogicalOr,E_Multiply,E_NotEquals,E_SameTerm,E_StrAfter,E_StrBefore,E_StrContains,E_StrDatatype,E_StrEndsWith,E_StrLang,E_StrStartsWith,E_Subtract
public abstract class ExprFunction2 extends ExprFunction
A function of two arguments
-
-
Field Summary
-
Fields inherited from interface org.apache.jena.sparql.expr.Expr
CMP_EQUAL, CMP_GREATER, CMP_INDETERMINATE, CMP_LESS, CMP_UNEQUAL, NONE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Exprapply(ExprTransform transform, Expr arg1, Expr arg2)ExprapplyNodeTransform(NodeTransform transform)Rewrite, applying a node->node transformationabstract Exprcopy(Expr arg1, Expr arg2)ExprcopySubstitute(Binding binding)Deep copy with substitutionNodeValueeval(Binding binding, FunctionEnv env)Evaluate this expression against the bindingabstract NodeValueeval(NodeValue x, NodeValue y)NodeValueeval(NodeValue x, NodeValue y, FunctionEnv env)ExprgetArg(int i)ExprgetArg1()ExprgetArg2()inthashCode()Exprare used in both syntax and algebra.intnumArgs()voidvisit(ExprVisitor visitor)-
Methods inherited from class org.apache.jena.sparql.expr.ExprFunction
equals, getArgs, getFunction, getFunctionIRI, getFunctionName, getFunctionPrintName, getFunctionSymbol, getOpName, isFunction
-
Methods inherited from class org.apache.jena.sparql.expr.ExprNode
asVar, deepCopy, equals, equalsBySyntax, getConstant, getExpr, getExprVar, getGraphPattern, getVarName, getVarsMentioned, isConstant, isExpr, isGraphPattern, isSatisfied, isVariable, toString
-
-
-
-
Method Detail
-
getArg1
public Expr getArg1()
-
getArg2
public Expr getArg2()
-
getArg
public Expr getArg(int i)
- Specified by:
getArgin classExprFunction
-
numArgs
public int numArgs()
- Specified by:
numArgsin classExprFunction
-
hashCode
public int hashCode()
Description copied from interface:ExprExprare used in both syntax and algebra. There is no syntax to algebra translation step because the parser uses operator precedence to build the right evaluation structure directly.The exceptions to this are the
NOT EXISTSandEXISTSexpressions which involve a query pattern. As a result there are different ways in syntax to produce the same algebra form.Two
Exprare considered equal if they are equal as algebra expressions.hashCodeandequalsmust implement that.There is also
equalsBySyntax. Because two different syntax forms can yield the same algebra, but two different algebra forms must be different syntax,equalsBySyntaximpliesequals(by alegbra).Hence, different
hashCode=> notequalsBySyntax.- Specified by:
hashCodein interfaceExpr- Overrides:
hashCodein classExprFunction
-
eval
public final NodeValue eval(Binding binding, FunctionEnv env)
Description copied from interface:ExprEvaluate this expression against the binding
-
eval
public NodeValue eval(NodeValue x, NodeValue y, FunctionEnv env)
-
copySubstitute
public final Expr copySubstitute(Binding binding)
Description copied from interface:ExprDeep copy with substitution- Specified by:
copySubstitutein interfaceExpr- Specified by:
copySubstitutein classExprNode
-
applyNodeTransform
public final Expr applyNodeTransform(NodeTransform transform)
Description copied from interface:ExprRewrite, applying a node->node transformation- Specified by:
applyNodeTransformin interfaceExpr- Specified by:
applyNodeTransformin classExprNode
-
visit
public void visit(ExprVisitor visitor)
-
apply
public Expr apply(ExprTransform transform, Expr arg1, Expr arg2)
-
-