Class ExprFunction1

All Implemented Interfaces:
Expr
Direct Known Subclasses:
E_Bound, E_Datatype, E_DateTimeDay, E_DateTimeHours, E_DateTimeMinutes, E_DateTimeMonth, E_DateTimeSeconds, E_DateTimeTimezone, E_DateTimeTZ, E_DateTimeYear, E_IRI, E_IsBlank, E_IsIRI, E_IsLiteral, E_IsNumeric, E_IsTriple, E_Lang, E_LogicalNot, E_NumAbs, E_NumCeiling, E_NumFloor, E_NumRound, E_Str, E_StrEncodeForURI, E_StrLength, E_StrLowerCase, E_StrUpperCase, E_TripleObject, E_TriplePredicate, E_TripleSubject, E_UnaryMinus, E_UnaryPlus, ExprDigest

public abstract class ExprFunction1 extends ExprFunction
A function that has a single argument
  • Method Details

    • getArg

      public Expr getArg()
    • getArg

      public Expr getArg(int i)
      Specified by:
      getArg in class ExprFunction
    • hashCode

      public int hashCode()
      Description copied from interface: Expr
      Expr are 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 EXISTS and EXISTS expressions which involve a query pattern. As a result there are different ways in syntax to produce the same algebra form.

      Two Expr are considered equal if they are equal as algebra expressions. hashCode and equals must 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, equalsBySyntax implies equals (by algebra).

      Hence, different hashCode => not equalsBySyntax.

      Specified by:
      hashCode in interface Expr
      Overrides:
      hashCode in class ExprFunction
    • numArgs

      public int numArgs()
      Specified by:
      numArgs in class ExprFunction
    • eval

      public final NodeValue eval(Binding binding, FunctionEnv env)
      Description copied from interface: Expr
      Evaluate this expression against the binding
      Specified by:
      eval in interface Expr
      Specified by:
      eval in class ExprNode
    • eval

      public NodeValue eval(NodeValue v, FunctionEnv env)
    • eval

      public abstract NodeValue eval(NodeValue nv)
    • copySubstitute

      public final Expr copySubstitute(Binding binding)
      Description copied from interface: Expr
      Deep copy with substitution
      Specified by:
      copySubstitute in interface Expr
      Specified by:
      copySubstitute in class ExprNode
    • applyNodeTransform

      public final Expr applyNodeTransform(NodeTransform transform)
      Description copied from interface: Expr
      Rewrite, applying a node->node transformation
      Specified by:
      applyNodeTransform in interface Expr
      Specified by:
      applyNodeTransform in class ExprNode
    • copy

      public abstract Expr copy(Expr expr)
    • visit

      public void visit(ExprVisitor visitor)
    • apply

      public Expr apply(ExprTransform transform, Expr sub)