org.wildfly.swarm.spi.api.config

## Interface Resolver<T>

- Type Parameters:
    `T` - The coercion type.
  All Known Implementing Classes:
    Builder

      public interface Resolver<T>

  Coercing resolver for a given configuration item.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<N> Resolver<N>` | `as(Class<N> clazz)` Retrieve a resolver capable of coercing to another simple type.
    `<N> Resolver<N>` | `as(Class<N> clazz, Converter<N> converter)` Retrieve a resolver capable of coering to another type.
    `ConfigKey` | `getKey()` Retrieve the key of the configuration item.
    `T` | `getValue()` Retrieve the coerced value.
    `boolean` | `hasValue()` Determine if there is any value set.
    `Resolver<T>` | `withDefault(T value)` Provide a default value to be provided in the case no value is currently bound.

- - ### Method Detail

    - #### getValue

          T getValue()

      Retrieve the coerced value.
      Returns:
        The coerced value.

    - #### hasValue

          boolean hasValue()

      Determine if there is any value set.
      Returns:
        `true` if a value is set, otherwise `false`

    - #### withDefault

          Resolver<T> withDefault(T value)

      Provide a default value to be provided in the case no value is currently bound.
      Parameters:
        `value` - The default fall-back value.
      Returns:
        This resolver.

    - #### getKey

          ConfigKey getKey()

      Retrieve the key of the configuration item.
      Returns:
        The key.

    - #### as

          <N> Resolver<N> as(Class<N> clazz)

      Retrieve a resolver capable of coercing to another simple type.
      Type Parameters:
        `N` - The value type to coerce to.
      Parameters:
        `clazz` - The class to coerce to.
      Returns:
        A new resolver capable of coercing to the given type.

    - #### as

          <N> Resolver<N> as(Class<N> clazz,
                             Converter<N> converter)

      Retrieve a resolver capable of coering to another type.
      Type Parameters:
        `N` - The value type to coerce to.
      Parameters:
        `clazz` - The class to coerce to.
        `converter` - The converter to support the coercion.
      Returns:
        A new resolver capable of coercing to the given type.

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