public final class YamlUtil extends Object
| Modifier and Type | Method and Description | 
|---|---|
| static YamlMapping | asMapping(YamlNode node)Takes a generic  YamlNodeinstance and returns it casted toYamlMappingif the type of the node is a descendant ofYamlMapping. | 
| static YamlScalar | asScalar(YamlNode node)Takes a generic  YamlNodeinstance and returns it casted toYamlScalarif the type of the node is a descendant ofYamlScalar. | 
| static YamlSequence | asSequence(YamlNode node)Takes a generic  YamlNodeinstance and returns it casted toYamlSequenceif the type of the node is a descendant ofYamlSequence. | 
| static <T> T | asType(YamlNode node,
      Class<T> type)Takes a generic  YamlNodeinstance and returns it casted to
 the providedtypeif the node is an instance of that type. | 
| static String | constructPath(YamlNode parent,
             String childName)Constructs the path of the node with the provided  parentnode andnodeName. | 
| static void | ensureRunningOnJava8OrHigher()Checks if the runtime environment is Java8 or higher. | 
| static boolean | isMapping(YamlNode node)Checks if the provided  nodeis a mapping | 
| static boolean | isOfSameType(YamlNode left,
            YamlNode right)Checks if the two provided  nodesare of the same type | 
| static boolean | isScalar(YamlNode node)Checks if the provided  nodeis a scalar | 
| static boolean | isSequence(YamlNode node)Checks if the provided  nodeis a sequence | 
public static YamlMapping asMapping(YamlNode node)
YamlNode instance and returns it casted to
 YamlMapping if the type of the node is a descendant of
 YamlMapping.node - The generic node to castYamlException - if the provided node is not a mappingpublic static YamlSequence asSequence(YamlNode node)
YamlNode instance and returns it casted to
 YamlSequence if the type of the node is a descendant of
 YamlSequence.node - The generic node to castYamlException - if the provided node is not a sequencepublic static YamlScalar asScalar(YamlNode node)
YamlNode instance and returns it casted to
 YamlScalar if the type of the node is a descendant of
 YamlScalar.node - The generic node to castYamlException - if the provided node is not a scalarpublic static <T> T asType(YamlNode node, Class<T> type)
YamlNode instance and returns it casted to
 the provided type if the node is an instance of that type.node - The generic node to castYamlException - if the provided node is not the expected typepublic static void ensureRunningOnJava8OrHigher()
UnsupportedOperationException.UnsupportedOperationException - If the runtime environment
                                       is not Java8 or higherpublic static String constructPath(YamlNode parent, String childName)
parent
 node and nodeName.parent - The parent nodechildName - The name of the node the path is constructed forpublic static boolean isMapping(YamlNode node)
node is a mappingnode - The node to checktrue if the provided node is a mappingpublic static boolean isSequence(YamlNode node)
node is a sequencenode - The node to checktrue if the provided node is a sequencepublic static boolean isScalar(YamlNode node)
node is a scalarnode - The node to checktrue if the provided node is a scalarCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.