public interface YamlMapping extends YamlCollection
UNNAMED_NODE| Modifier and Type | Method and Description |
|---|---|
YamlNode |
child(String name)
Gets a child node by its name
|
YamlMapping |
childAsMapping(String name)
Gets a child mapping node by its name
|
YamlScalar |
childAsScalar(String name)
Gets a child scalar node by its name
|
<T> T |
childAsScalarValue(String name)
Gets a child scalar node's value by its name
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(String name,
Class<T> type)
Gets a child scalar node's value by its name with type hinting
See
YamlScalar for the possible types |
YamlSequence |
childAsSequence(String name)
Gets a child sequence node by its name
|
childCount, childrenYamlNode child(String name)
name - the name of the child nodenull otherwiseYamlMapping childAsMapping(String name)
name - the name of the child nodenull otherwiseYamlSequence childAsSequence(String name)
name - the name of the child nodenull otherwiseYamlScalar childAsScalar(String name)
name - the name of the child nodenull otherwise<T> T childAsScalarValue(String name)
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.name - the name of the child nodenull otherwiseYamlScalar,
childAsScalarValue(String, Class)<T> T childAsScalarValue(String name, Class<T> type)
YamlScalar for the possible typesname - the name of the child nodetype - the type that the scalar's value type to be validated
againstYamlException - if the scalar's value is not a type of TYamlScalarCopyright © 2019. All Rights Reserved.