Package org.apache.jena.sparql.expr
Class ExprFunction0
- 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_Random,E_StrUUID,E_UUID,E_Version,ExprSystem
public abstract class ExprFunction0 extends ExprFunction
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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Exprapply(ExprTransform transform)ExprapplyNodeTransform(NodeTransform transform)Rewrite, applying a node->node transformationabstract Exprcopy()ExprcopySubstitute(Binding binding)Deep copy with substitutionNodeValueeval(Binding binding, FunctionEnv env)Evaluate this expression against the bindingabstract NodeValueeval(FunctionEnv env)ExprgetArg(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, 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
-
getArg
public Expr getArg(int i)
- 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 alegbra).Hence, different
hashCode=> notequalsBySyntax.- Specified by:
hashCodein interfaceExpr- Overrides:
hashCodein classExprFunction
-
numArgs
public int numArgs()
- Specified by:
numArgsin classExprFunction
-
eval
public final NodeValue eval(Binding binding, FunctionEnv env)
Description copied from interface:ExprEvaluate this expression against the binding
-
eval
public abstract NodeValue eval(FunctionEnv env)
-
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
-
copy
public abstract Expr copy()
-
copySubstitute
public final Expr copySubstitute(Binding binding)
Description copied from interface:ExprDeep copy with substitution- Specified by:
copySubstitutein interfaceExpr- Specified by:
copySubstitutein classExprNode
-
visit
public void visit(ExprVisitor visitor)
-
apply
public Expr apply(ExprTransform transform)
-
-