Class Condition

    • Method Detail

      • fromNode

        public static Condition fromNode​(Node node)
        Constructs a condition from the given node.
        Parameters:
        node - the node.
        Returns:
        the condition instance.
      • getResult

        public java.util.Optional<Identifier> getResult()
        Get the identifier of the parameter that the result is assigned to.
        Returns:
        the optional identifier.
      • getFunction

        public Expression getFunction()
        Gets the function used to express this condition.
        Returns:
        the function for this condition.
      • typeCheck

        public Type typeCheck​(Scope<Type> scope)
        Description copied from interface: TypeCheck
        Checks whether the given types within a scope satisfy the constraints.
        Specified by:
        typeCheck in interface TypeCheck
        Parameters:
        scope - the scope to evaluate.
        Returns:
        the type validated by the scope check.
      • 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.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object