Class ArrayNode

All Implemented Interfaces:
IParsedExpression, Node, Serializable

public class ArrayNode extends ExpressionNode
A node representing an array to create.
See Also:
  • Field Details

    • ARRAY

      public static final int ARRAY
      The array with content constructor.
      See Also:
    • ARRAY_DIMENSION

      public static final int ARRAY_DIMENSION
      The empty array constructor.
      See Also:
    • type

      protected int type
      The node type.
  • Constructor Details

    • ArrayNode

      public ArrayNode(jadex.javaparser.javaccimpl.ParserImpl p, int id)
      Create an expression node.
      Parameters:
      p - The parser.
      id - The id.
  • Method Details

    • setType

      public void setType(int type)
      Set the node type.
      Parameters:
      type - The node type.
    • getType

      public int getType()
      Get the node type.
      Returns:
      The node type.
    • precompile

      public void precompile()
      Precompute type, and perform checks.
      Overrides:
      precompile in class ExpressionNode
    • getValue

      public Object getValue(jadex.common.IValueFetcher fetcher)
      Evaluate the expression in the given state with respect to given parameters.
      Specified by:
      getValue in interface IParsedExpression
      Specified by:
      getValue in class ExpressionNode
      Parameters:
      params - The parameters (string, value pairs), if any.
      Returns:
      The value of the term.
    • toPlainString

      public String toPlainString()
      Create a string representation of this node and its subnodes.
      Specified by:
      toPlainString in interface Node
      Overrides:
      toPlainString in class ExpressionNode
      Returns:
      A string representation of this node.
    • equals

      public boolean equals(Object o)
      Test if two nodes are equal.
      Overrides:
      equals in class ExpressionNode
    • hashCode

      public int hashCode()
      Get the hash code for the node.
      Overrides:
      hashCode in class ExpressionNode