org.wildfly.swarm.spi.api.config

## Interface ConfigKey

- All Known Implementing Classes:
    CompositeKey, SimpleKey

      public interface ConfigKey

  A key to configuration values.
  Author:
    Bob McWhirter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SimpleKey` | `EMPTY` Sentinal representing an empty key.
    `static char` | `END_DELIM`
    `static char` | `START_DELIM`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `ConfigKey` | `append(ConfigKey key)` Return a new key with the given key appended.
    `ConfigKey` | `append(String... names)` Return a new key with the given segments appended.
    `SimpleKey` | `head()` Return the first segment of this key.
    `boolean` | `isChildOf(ConfigKey possibleParent)` Determine if this key is a child of the argument.
    `String` | `name()` String representation of this key's name.
    `static ConfigKey` | `of(String... parts)` Create a key from a series of names.
    `static ConfigKey` | `parse(String str)` Parse a multi-segment key from a single string.
    `String` | `propertyName()` String representation of this key's name in property format.
    `void` | `replace(int position, String name)`
    `ConfigKey` | `subkey(int offset)` Return the subkey of this key from a given offset.

- - ### Field Detail

    - #### EMPTY

          static final SimpleKey EMPTY

      Sentinal representing an empty key.

    - #### START_DELIM

          static final char START_DELIM

      See Also:
        Constant Field Values

    - #### END_DELIM

          static final char END_DELIM

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### name

          String name()

      String representation of this key's name.
      Returns:
        The name.

    - #### propertyName

          String propertyName()

      String representation of this key's name in property format.
      Returns:
        The name in property format.

    - #### head

          SimpleKey head()

      Return the first segment of this key.
      Returns:
        The first segment of this key.

    - #### subkey

          ConfigKey subkey(int offset)

      Return the subkey of this key from a given offset.
      Parameters:
        `offset` - The number of segments offset from the head to subkey.
      Returns:
        The subkey or `EMPTY`.

    - #### append

          ConfigKey append(String... names)

      Return a new key with the given segments appended.
      Parameters:
        `names` - The segments to append.
      Returns:
        The new key.

    - #### append

          ConfigKey append(ConfigKey key)

      Return a new key with the given key appended.
      Parameters:
        `key` - The key to append.
      Returns:
        The new key.

    - #### isChildOf

          boolean isChildOf(ConfigKey possibleParent)

      Determine if this key is a child of the argument.
      Parameters:
        `possibleParent` - The possible parent key.
      Returns:
        `true` if this key is a child of the argument, otherwise `false`.

    - #### replace

          void replace(int position,
                       String name)

    - #### of

          static ConfigKey of(String... parts)

      Create a key from a series of names.
      Parameters:
        `parts` - The segments.
      Returns:
        The new key.

    - #### parse

          static ConfigKey parse(String str)

      Parse a multi-segment key from a single string.
      Parameters:
        `str` - The string to parse.
      Returns:
        The new key.

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