Class ArrayValue
java.lang.Object
software.amazon.smithy.rulesengine.language.evaluation.value.Value
software.amazon.smithy.rulesengine.language.evaluation.value.ArrayValue
- All Implemented Interfaces:
FromSourceLocation
,ToNode
An array of values of the same type.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the current value as anArrayValue
, throwingRuntimeException
when the value is the wrong type.get
(int index) Gets the value at the index, or an empty value if none is present.getType()
Gets all the values in the array.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, expectBooleanValue, expectEndpointValue, expectIntegerValue, expectRecordValue, expectStringValue, fromNode, getSourceLocation, integerValue, isEmpty, recordValue, stringValue
-
Method Details
-
getValues
Gets all the values in the array.- Returns:
- the values in the array.
-
get
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
-
expectArrayValue
Description copied from class:Value
Returns the current value as anArrayValue
, throwingRuntimeException
when the value is the wrong type.- Overrides:
expectArrayValue
in classValue
- Returns:
- returns an array value.
-
toNode
Description copied from interface:ToNode
Converts a value to aNode
.- Returns:
- Returns the creates Node.
-
equals
-
hashCode
public int hashCode() -
toString
-