java.lang.Object
software.amazon.smithy.rulesengine.language.evaluation.value.Value
software.amazon.smithy.rulesengine.language.evaluation.value.ArrayValue
All Implemented Interfaces:
FromSourceLocation, ToNode

public final class ArrayValue extends Value
An array of values of the same type.
  • Method Details

    • getValues

      public List<Value> getValues()
      Gets all the values in the array.
      Returns:
      the values in the array.
    • get

      public Value get(int index)
      Gets the value at the index, or an empty value if none is present.
      Parameters:
      index - the index to get the value of.
      Returns:
      the value at the index, or an empty value if not present.
    • getType

      public Type getType()
      Specified by:
      getType in class Value
    • expectArrayValue

      public ArrayValue expectArrayValue()
      Description copied from class: Value
      Returns the current value as an ArrayValue, throwing RuntimeException when the value is the wrong type.
      Overrides:
      expectArrayValue in class Value
      Returns:
      returns an array value.
    • toNode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object