com.hazelcast.config.yaml

## Class W3cDomUtil

- java.lang.Object
- - com.hazelcast.config.yaml.W3cDomUtil

-     public final class W3cDomUtil
      extends Object

  Utility methods for YAML to W3C adaptors

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Node` | `asW3cNode(com.hazelcast.internal.yaml.YamlNode yamlNode)` Returns an adapted W3C `Node` view of the provided `YamlNode`
    `static com.hazelcast.internal.yaml.MutableYamlNode` | `getWrappedMutableYamlNode(Node node)` Returns the the wrapped `MutableYamlNode` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `MutableYamlNode`.
    `static com.hazelcast.internal.yaml.YamlMapping` | `getWrappedYamlMapping(Node node)` Returns the the wrapped `YamlMapping` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `YamlMapping`.
    `static com.hazelcast.internal.yaml.YamlScalar` | `getWrappedYamlScalar(Node node)` Returns the the wrapped `YamlScalar` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `YamlScalar`.
    `static com.hazelcast.internal.yaml.YamlSequence` | `getWrappedYamlSequence(Node node)` Returns the the wrapped `YamlSequence` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `YamlSequence`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### asW3cNode

          public static Node asW3cNode(com.hazelcast.internal.yaml.YamlNode yamlNode)

      Returns an adapted W3C `Node` view of the provided `YamlNode`
      Parameters:
        `yamlNode` - The YAML node to adapt
      Returns:
        the adapted W3C Node or `null` if the provided YAML node is `null`

    - #### getWrappedYamlMapping

          public static com.hazelcast.internal.yaml.YamlMapping getWrappedYamlMapping(Node node)

      Returns the the wrapped `YamlMapping` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `YamlMapping`.
      Parameters:
        `node` - The W3C node wrapping a YAML node
      Returns:
        the wrapped YAML node as mapping
      Throws:
        `IllegalArgumentException` - if the provided node is not an instance of `ElementAdapter`

    - #### getWrappedYamlSequence

          public static com.hazelcast.internal.yaml.YamlSequence getWrappedYamlSequence(Node node)

      Returns the the wrapped `YamlSequence` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `YamlSequence`.
      Parameters:
        `node` - The W3C node wrapping a YAML node
      Returns:
        the wrapped YAML node as sequence
      Throws:
        `IllegalArgumentException` - if the provided node is not an instance of `ElementAdapter`

    - #### getWrappedYamlScalar

          public static com.hazelcast.internal.yaml.YamlScalar getWrappedYamlScalar(Node node)

      Returns the the wrapped `YamlScalar` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `YamlScalar`.
      Parameters:
        `node` - The W3C node wrapping a YAML node
      Returns:
        the wrapped YAML node as scalar
      Throws:
        `IllegalArgumentException` - if the provided node is not an instance of `ElementAdapter`

    - #### getWrappedMutableYamlNode

          public static com.hazelcast.internal.yaml.MutableYamlNode getWrappedMutableYamlNode(Node node)

      Returns the the wrapped `MutableYamlNode` instance of the provided `Node` if the `node` is an instance of `ElementAdapter` and the YAML node wrapped by the `node` is a `MutableYamlNode`.
      Parameters:
        `node` - The W3C node wrapping a YAML node
      Returns:
        the wrapped YAML node as a mutable YAML node
      Throws:
        `IllegalArgumentException` - if the provided node is not an instance of `ElementAdapter`

Copyright © 2020. All rights reserved.