org.wildfly.swarm.spi.api.config

## Class SimpleKey

- java.lang.Object
- - org.wildfly.swarm.spi.api.config.SimpleKey

- All Implemented Interfaces:
    ConfigKey

      public class SimpleKey
      extends Object
      implements ConfigKey

  Author:
    Bob McWhirter

- - ### Field Summary

    - ### Fields inherited from interface org.wildfly.swarm.spi.api.config.ConfigKey

      `EMPTY, END_DELIM, START_DELIM`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleKey(String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete 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.
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `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.
    `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.
    `String` | `toString()`

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

      `getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface org.wildfly.swarm.spi.api.config.ConfigKey

      `of, parse`

- - ### Constructor Detail

    - #### SimpleKey

          public SimpleKey(String name)

  - ### Method Detail

    - #### name

          public String name()

      Description copied from interface: `ConfigKey`
      String representation of this key's name.
      Specified by:
        `name` in interface `ConfigKey`
      Returns:
        The name.

    - #### propertyName

          public String propertyName()

      Description copied from interface: `ConfigKey`
      String representation of this key's name in property format.
      Specified by:
        `propertyName` in interface `ConfigKey`
      Returns:
        The name in property format.

    - #### head

          public SimpleKey head()

      Description copied from interface: `ConfigKey`
      Return the first segment of this key.
      Specified by:
        `head` in interface `ConfigKey`
      Returns:
        The first segment of this key.

    - #### subkey

          public ConfigKey subkey(int offset)

      Description copied from interface: `ConfigKey`
      Return the subkey of this key from a given offset.
      Specified by:
        `subkey` in interface `ConfigKey`
      Parameters:
        `offset` - The number of segments offset from the head to subkey.
      Returns:
        The subkey or `ConfigKey.EMPTY`.

    - #### isChildOf

          public boolean isChildOf(ConfigKey possibleParent)

      Description copied from interface: `ConfigKey`
      Determine if this key is a child of the argument.
      Specified by:
        `isChildOf` in interface `ConfigKey`
      Parameters:
        `possibleParent` - The possible parent key.
      Returns:
        `true` if this key is a child of the argument, otherwise `false`.

    - #### replace

          public void replace(int position,
                              String name)

      Specified by:
        `replace` in interface `ConfigKey`

    - #### append

          public ConfigKey append(ConfigKey key)

      Description copied from interface: `ConfigKey`
      Return a new key with the given key appended.
      Specified by:
        `append` in interface `ConfigKey`
      Parameters:
        `key` - The key to append.
      Returns:
        The new key.

    - #### append

          public ConfigKey append(String... names)

      Description copied from interface: `ConfigKey`
      Return a new key with the given segments appended.
      Specified by:
        `append` in interface `ConfigKey`
      Parameters:
        `names` - The segments to append.
      Returns:
        The new key.

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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