java.lang.Object
org.apache.jena.sparql.expr.ExprNode
org.apache.jena.sparql.expr.ExprFunction
org.apache.jena.sparql.expr.ExprFunction0
- All Implemented Interfaces:
Expr
- Direct Known Subclasses:
E_BNode.BNode0,E_Random,E_StrUUID,E_UUID,E_Version,ExprSystem
An expression that is constant (does not depend on evaluating a sub expression).
-
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
Modifier and TypeMethodDescriptionapply(ExprTransform transform) final ExprapplyNodeTransform(NodeTransform transform) Rewrite, applying a node->node transformationabstract Exprcopy()final ExprcopySubstitute(Binding binding) Deep copy with substitutionfinal NodeValueeval(Binding binding, FunctionEnv env) Evaluate this expression against the bindingabstract NodeValueeval(FunctionEnv env) getArg(int i) 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, isFunctionMethods 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 Details
-
getArg
- Specified by:
getArgin 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 algebra).Hence, different
hashCode=> notequalsBySyntax.- Specified by:
hashCodein interfaceExpr- Overrides:
hashCodein classExprFunction
-
numArgs
public int numArgs()- Specified by:
numArgsin classExprFunction
-
eval
Description copied from interface:ExprEvaluate this expression against the binding -
eval
-
applyNodeTransform
Description copied from interface:ExprRewrite, applying a node->node transformation- Specified by:
applyNodeTransformin interfaceExpr- Specified by:
applyNodeTransformin classExprNode
-
copy
-
copySubstitute
Description copied from interface:ExprDeep copy with substitution- Specified by:
copySubstitutein interfaceExpr- Specified by:
copySubstitutein classExprNode
-
visit
-
apply
-