org.wildfly.swarm.container.config

## Class ConfigNode

- java.lang.Object
- - org.wildfly.swarm.container.config.ConfigNode

- All Implemented Interfaces:
    ConfigTree

      public class ConfigNode
      extends Object
      implements ConfigTree

  A configuration node capable of having a direct value in addition to key/value children.
  Author:
    Bob McWhirter

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConfigNode()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Stream<ConfigKey>` | `allKeysRecursively()` Retrieve all descendent keys.
    `List` | `asList()`
    `Map` | `asMap()`
    `Object` | `asObject()`
    `void` | `child(SimpleKey key, Object value)` Set the value of an immediate child.
    `void` | `child(String key, Object value)` Set the value of an immediate child.
    `Set<SimpleKey>` | `childrenKeys()` Retrieve all immediate children keys.
    `void` | `recursiveChild(ConfigKey key, Object value)` Set the value of a descendant.
    `void` | `recursiveChild(String key, Object value)` Set the value of a descendant.
    `String` | `toString()`
    `Object` | `valueOf(ConfigKey key)` Retrieve a value.

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

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ConfigNode

          public ConfigNode()

  - ### Method Detail

    - #### child

          public void child(SimpleKey key,
                            Object value)

      Set the value of an immediate child.
      Parameters:
        `key` - The simple child key.
        `value` - The value to set.

    - #### child

          public void child(String key,
                            Object value)

      Set the value of an immediate child.
      Parameters:
        `key` - The simple child key.
        `value` - The value to set.

    - #### recursiveChild

          public void recursiveChild(String key,
                                     Object value)

      Set the value of a descendant.

      Any intermediate leafs will be created as-needed.

      Parameters:
        `key` - The possibly-complex key to a descendant.
        `value` - The value to set.

    - #### recursiveChild

          public void recursiveChild(ConfigKey key,
                                     Object value)

      Set the value of a descendant.

      Any intermediate leafs will be created as-needed.

      Parameters:
        `key` - The possibly-complex key to a descendant.
        `value` - The value to set.

    - #### childrenKeys

          public Set<SimpleKey> childrenKeys()

      Retrieve all immediate children keys.
      Returns:
        All immediate children keys.

    - #### allKeysRecursively

          public Stream<ConfigKey> allKeysRecursively()

      Retrieve all descendent keys.
      Returns:
        A stream of all descendent keys.

    - #### valueOf

          public Object valueOf(ConfigKey key)

      Retrieve a value.
      Parameters:
        `key` - The possibly-complex key of the value to retrieve.
      Returns:
        The value of `null` if none.

    - #### asObject

          public Object asObject()

    - #### asList

          public List asList()

      Specified by:
        `asList` in interface `ConfigTree`

    - #### asMap

          public Map asMap()

      Specified by:
        `asMap` in interface `ConfigTree`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2017 JBoss by Red Hat. All rights reserved.