Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.configuration
Class ConfigurationMap

    java.lang.Object
      java.util.AbstractMap
          org.apache.commons.configuration.ConfigurationMap

All Implemented Interfaces:
  Map

Direct Known Subclasses:
  ConfigurationDynaBean

    public class ConfigurationMap

extends AbstractMap

The `ConfigurationMap` wraps a configuration-collection `Configuration` instance to provide a `Map` interface.

Note: This implementation is incomplete.

Since:
  1.0
Version:
  $Revision: 492216 $, $Date: 2007-01-03 17:51:24 +0100 (Mi, 03. Jan 2007) $
Author:
  Ricardo Gladwell

Nested Class Summary

Nested classes/interfaces inherited from class java.util.AbstractMap
`AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry`

Nested classes/interfaces inherited from interface java.util.Map
`Map.Entry`

Constructor Summary
`ConfigurationMap(Configuration configuration)` Creates a new instance of a `ConfigurationMap` that wraps the specified `Configuration` instance.

Method Summary
`Set` | `entrySet()` Returns a set with the entries contained in this configuration-based map.
`Object` | `get(Object key)` Returns the value of the specified key.
`Configuration` | `getConfiguration()` Returns the wrapped `Configuration` object.
`Object` | `put(Object key, Object value)` Stores the value for the specified key.

Methods inherited from class java.util.AbstractMap
`clear, clone, containsKey, containsValue, equals, hashCode, isEmpty, keySet, putAll, remove, size, toString, values`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ConfigurationMap

    public ConfigurationMap(Configuration configuration)

  Creates a new instance of a `ConfigurationMap` that wraps the specified `Configuration` instance.

  Parameters:
    `configuration` - `Configuration` instance.

Method Detail

### getConfiguration

    public Configuration getConfiguration()

  Returns the wrapped `Configuration` object.

  Returns:
    the wrapped configuration
  Since:
    1.2

### entrySet

    public Set entrySet()

  Returns a set with the entries contained in this configuration-based map.

  Specified by:
    `entrySet` in interface `Map`
  Specified by:
    `entrySet` in class `AbstractMap`
  Returns:
    a set with the contained entries
  See Also:
    `Map.entrySet()`

### put

    public Object put(Object key,
                      Object value)

  Stores the value for the specified key. The value is stored in the underlying configuration.

  Specified by:
    `put` in interface `Map`
  Overrides:
    `put` in class `AbstractMap`
  Parameters:
    `key` - the key (will be converted to a string)
    `value` - the value
  Returns:
    the old value of this key or null if it is new
  See Also:
    `Map.put(java.lang.Object, java.lang.Object)`

### get

    public Object get(Object key)

  Returns the value of the specified key. The key is converted to a string and then passed to the underlying configuration.

  Specified by:
    `get` in interface `Map`
  Overrides:
    `get` in class `AbstractMap`
  Parameters:
    `key` - the key
  Returns:
    the value of this key
  See Also:
    `Map.get(java.lang.Object)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.