All Implemented Interfaces:
FromSourceLocation, ToNode, Into<Condition>, TypeCheck
Direct Known Subclasses:
BooleanEquals, IsSet, LibraryFunction, Not, StringEquals

public abstract class Function extends Expression implements Into<Condition>
  • Field Details

  • Constructor Details

  • Method Details

    • condition

      public Condition condition()
      Convert this function into a condition.
      Returns:
      the function as a condition.
    • condition

      public Condition condition(String result)
      Converts this function into a condition which stores the output in the named result.
      Parameters:
      result - the name of the result parameter.
      Returns:
      the function as a condition.
    • getName

      public String getName()
      Returns the name of this function, eg. isSet, parseUrl
      Returns:
      The name
    • getArguments

      public List<Expression> getArguments()
      Returns:
      The arguments to this function
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • expectOneArgument

      protected Expression expectOneArgument()
    • getSourceLocation

      public SourceLocation getSourceLocation()
      Description copied from interface: FromSourceLocation
      Gets the source location of a value.
      Specified by:
      getSourceLocation in interface FromSourceLocation
      Overrides:
      getSourceLocation in class MandatorySourceLocation
      Returns:
      Returns the source location of the value.
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in class Expression
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in class Expression
    • toNode

      public Node toNode()
      Description copied from interface: ToNode
      Converts a value to a Node.
      Specified by:
      toNode in interface ToNode
      Returns:
      Returns the creates Node.
    • into

      public Condition into()
      Specified by:
      into in interface Into<Condition>