org.apache.tamaya.events

## Class FrozenConfiguration

- java.lang.Object
- - org.apache.tamaya.events.FrozenConfiguration

- All Implemented Interfaces:
    Serializable, org.apache.tamaya.Configuration

      public final class FrozenConfiguration
      extends Object
      implements org.apache.tamaya.Configuration, Serializable

  /** Configuration implementation that stores all current values of a given (possibly dynamic, contextual and non server capable instance) and is fully serializable. Note that hereby only the scannable key/value pairs are considered.
  See Also:
    Serialized Form

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object o)`
    `String` | `get(String key)`
    `<T> T` | `get(String key, Class<T> type)`
    `<T> T` | `get(String key, org.apache.tamaya.TypeLiteral<T> type)` Accesses the current String value for the given key and tries to convert it using the `PropertyConverter` instances provided by the current `ConfigurationContext`.
    `org.apache.tamaya.spi.ConfigurationContext` | `getContext()`
    `<T> T` | `getOrDefault(String key, Class<T> type, T defaultValue)`
    `String` | `getOrDefault(String key, String defaultValue)`
    `<T> T` | `getOrDefault(String key, org.apache.tamaya.TypeLiteral<T> type, T defaultValue)`
    `Map<String,String>` | `getProperties()`
    `int` | `hashCode()`
    `static FrozenConfiguration` | `of(org.apache.tamaya.Configuration config)` Creates a new FrozenConfiguration instance based on a Configuration given.
    `<T> T` | `query(org.apache.tamaya.ConfigQuery<T> query)`
    `String` | `toString()`
    `org.apache.tamaya.Configuration` | `with(org.apache.tamaya.ConfigOperator operator)`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### of

          public static FrozenConfiguration of(org.apache.tamaya.Configuration config)

      Creates a new FrozenConfiguration instance based on a Configuration given.
      Parameters:
        `config` - the configuration to be frozen, not null.
      Returns:
        the frozen Configuration.

    - #### get

          public String get(String key)

      Specified by:
        `get` in interface `org.apache.tamaya.Configuration`

    - #### getOrDefault

          public String getOrDefault(String key,
                            String defaultValue)

      Specified by:
        `getOrDefault` in interface `org.apache.tamaya.Configuration`

    - #### getOrDefault

          public <T> T getOrDefault(String key,
                           Class<T> type,
                           T defaultValue)

      Specified by:
        `getOrDefault` in interface `org.apache.tamaya.Configuration`

    - #### get

          public <T> T get(String key,
                  Class<T> type)

      Specified by:
        `get` in interface `org.apache.tamaya.Configuration`

    - #### get

          public <T> T get(String key,
                  org.apache.tamaya.TypeLiteral<T> type)

      Accesses the current String value for the given key and tries to convert it using the `PropertyConverter` instances provided by the current `ConfigurationContext`.
      Specified by:
        `get` in interface `org.apache.tamaya.Configuration`
      Type Parameters:
        `T` - the value type
      Parameters:
        `key` - the property's absolute, or relative path, e.g. @code a/b/c/d.myProperty}.
        `type` - The target type required, not null.
      Returns:
        the converted value, never null.

    - #### getOrDefault

          public <T> T getOrDefault(String key,
                           org.apache.tamaya.TypeLiteral<T> type,
                           T defaultValue)

      Specified by:
        `getOrDefault` in interface `org.apache.tamaya.Configuration`

    - #### getProperties

          public Map<String,String> getProperties()

      Specified by:
        `getProperties` in interface `org.apache.tamaya.Configuration`

    - #### with

          public org.apache.tamaya.Configuration with(org.apache.tamaya.ConfigOperator operator)

      Specified by:
        `with` in interface `org.apache.tamaya.Configuration`

    - #### query

          public <T> T query(org.apache.tamaya.ConfigQuery<T> query)

      Specified by:
        `query` in interface `org.apache.tamaya.Configuration`

    - #### getContext

          public org.apache.tamaya.spi.ConfigurationContext getContext()

      Specified by:
        `getContext` in interface `org.apache.tamaya.Configuration`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014–2016 Apache Software Foundation. All rights reserved.