public interface YamlSequence extends YamlCollection
UNNAMED_NODE
Modifier and Type | Method and Description |
---|---|
YamlNode |
child(int index)
Gets a child node by its index
|
YamlMapping |
childAsMapping(int index)
Gets a child mapping node by its index
|
YamlScalar |
childAsScalar(int index)
Gets a child scalar node by its index
|
<T> T |
childAsScalarValue(int index)
Gets a child scalar node's value by its index
See
YamlScalar for the possible types
Please note that if the scalar's type is not the expected type T,
a ClassCastException is thrown at the call site. |
<T> T |
childAsScalarValue(int index,
Class<T> type)
Gets a child scalar node's value by its name with type hinting
See
YamlScalar for the possible types |
YamlSequence |
childAsSequence(int index)
Gets a child sequence node by its index
|
childCount, children
YamlNode child(int index)
index
- the index of the child nodenull
otherwiseYamlMapping childAsMapping(int index)
index
- the index of the child nodenull
otherwiseYamlSequence childAsSequence(int index)
index
- the index of the child nodenull
otherwiseYamlScalar childAsScalar(int index)
index
- the index of the child nodenull
otherwise<T> T childAsScalarValue(int index)
YamlScalar
for the possible types
Please note that if the scalar's type is not the expected type T,
a ClassCastException
is thrown at the call site.index
- the index of the child nodenull
otherwiseYamlScalar
<T> T childAsScalarValue(int index, Class<T> type)
YamlScalar
for the possible typesindex
- the index of the child nodetype
- the type that the scalar's value type to be validated
againstnull
otherwiseYamlException
- if the scalar's value is not a type of TYamlScalar
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.