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

public final class RecordValue extends Value
A record value, containing a map of identifiers to other values.
  • Method Details

    • getValue

      public Map<Identifier,Value> getValue()
      Gets the map of identifiers to other values.
      Returns:
      the map of identifiers to other values.
    • get

      public Value get(String key)
      Gets the value in the record for the provided key.
      Parameters:
      key - the key to retrieve a value for.
      Returns:
      the value for the provided key, or null if the key is not present.
    • get

      public Value get(Identifier key)
      Gets the value in the record for the provided key.
      Parameters:
      key - the key to retrieve a value for.
      Returns:
      the value for the provided key, or null if the key is not present.
    • getType

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

      public RecordValue expectRecordValue()
      Description copied from class: Value
      Returns the current value as an ArrayValue, throwing RuntimeException when the value is the wrong type.
      Overrides:
      expectRecordValue in class Value
      Returns:
      returns a record 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