Class RecordValue
java.lang.Object
software.amazon.smithy.rulesengine.language.evaluation.value.Value
software.amazon.smithy.rulesengine.language.evaluation.value.RecordValue
- All Implemented Interfaces:
FromSourceLocation
,ToNode
A record value, containing a map of identifiers to other values.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the current value as anArrayValue
, throwingRuntimeException
when the value is the wrong type.Gets the value in the record for the provided key.get
(Identifier key) Gets the value in the record for the provided key.getType()
getValue()
Gets the map of identifiers to other values.int
hashCode()
toNode()
Converts a value to aNode
.toString()
Methods inherited from class software.amazon.smithy.rulesengine.language.evaluation.value.Value
arrayValue, booleanValue, emptyValue, endpointValue, expectArrayValue, expectBooleanValue, expectEndpointValue, expectIntegerValue, expectStringValue, fromNode, getSourceLocation, integerValue, isEmpty, recordValue, stringValue
-
Method Details
-
getValue
Gets the map of identifiers to other values.- Returns:
- the map of identifiers to other values.
-
get
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
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
-
expectRecordValue
Description copied from class:Value
Returns the current value as anArrayValue
, throwingRuntimeException
when the value is the wrong type.- Overrides:
expectRecordValue
in classValue
- Returns:
- returns a record value.
-
toNode
Description copied from interface:ToNode
Converts a value to aNode
.- Returns:
- Returns the creates Node.
-
equals
-
hashCode
public int hashCode() -
toString
-