org.apache.tamaya.format

## Class ConfigurationData

- java.lang.Object
- - org.apache.tamaya.format.ConfigurationData

-     public final class ConfigurationData
      extends Object

  Data that abstracts the data read from a configuration resources using a certain format. The data can be divided into different sections, similar to ini-files. Herebey different sections the best map to entries with different priorities to be applied, when integrated into PropertySource instances.

  New instances of this class can be created using a `ConfigurationDataBuilder`.

  ### Implementation Specification

  This class is
  - immutable
  - thread-safe

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,String>` | `getCombinedProperties()` Get combined properties for this config data instance.
    `Map<String,String>` | `getDefaultProperties()` Convenience accessor for accessing the default section.
    `ConfigurationFormat` | `getFormat()` Get the `ConfigurationFormat` that read this data.
    `String` | `getResource()` Get the resource from which this data was read.
    `Map<String,String>` | `getSection(String name)` Get a section's data.
    `Set<String>` | `getSectionNames()` Access an immutable Set of all present section names, including the default section (if any).
    `Map<String,Map<String,String>>` | `getSections()` Accessor used for easily creating a new builder based on a given data instance.
    `boolean` | `hasCombinedProperties()` Immutable accessor to ckeck, if there are combined properties set.
    `boolean` | `hasDefaultProperties()` Immutable accessor to ckeck, if there are default properties present.
    `boolean` | `isEmpty()` Checks if no properties are contained in this data item.
    `String` | `toString()`

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

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

- - ### Method Detail

    - #### getFormat

          public ConfigurationFormat getFormat()

      Get the `ConfigurationFormat` that read this data.
      Returns:
        the `ConfigurationFormat` that read this data, never null.

    - #### getResource

          public String getResource()

      Get the resource from which this data was read.
      Returns:
        the resource from which this data was read, never null.

    - #### getSectionNames

          public Set<String> getSectionNames()

      Access an immutable Set of all present section names, including the default section (if any).
      Returns:
        the set of present section names, never null.

    - #### getSection

          public Map<String,String> getSection(String name)

      Get a section's data.
      Parameters:
        `name` - the section name, not null.
      Returns:
        the data of this section, or null, if no such section exists.

    - #### getDefaultProperties

          public Map<String,String> getDefaultProperties()

      Convenience accessor for accessing the default section.
      Returns:
        the default section's data, or null, if no such section exists.

    - #### getCombinedProperties

          public Map<String,String> getCombinedProperties()

      Get combined properties for this config data instance. If
      Returns:
        the normalized properties.

    - #### getSections

          public Map<String,Map<String,String>> getSections()

      Accessor used for easily creating a new builder based on a given data instance.
      Returns:
        the data contained, never null.

    - #### hasDefaultProperties

          public boolean hasDefaultProperties()

      Immutable accessor to ckeck, if there are default properties present.
      Returns:
        true, if default properties are present.

    - #### hasCombinedProperties

          public boolean hasCombinedProperties()

      Immutable accessor to ckeck, if there are combined properties set.
      Returns:
        true, if combined properties are set.

    - #### isEmpty

          public boolean isEmpty()

      Checks if no properties are contained in this data item.
      Returns:
        true, if no properties are contained in this data item.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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