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 TypeMethodDescriptionbooleanReturns the current value as anArrayValue, throwingRuntimeExceptionwhen 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.inthashCode()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:ValueReturns the current value as anArrayValue, throwingRuntimeExceptionwhen the value is the wrong type.- Overrides:
expectArrayValuein classValue- Returns:
- returns an array value.
-
toNode
Description copied from interface:ToNodeConverts a value to aNode.- Returns:
- Returns the creates Node.
-
equals
-
hashCode
public int hashCode() -
toString
-