org.chwf.config
Class ConfigMap

java.lang.Object
  |
  +--java.util.AbstractMap
        |
        +--org.chwf.config.ConfigMap
All Implemented Interfaces:
java.util.Map

public class ConfigMap
extends java.util.AbstractMap

Adapter map for Config objects. Useful if configuration needs to be available in environments that use maps. Only the get() method is supported. All others, including the iterator() method, will throw an UnsupportedOperationException.

Author:
Paul Strack

Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Constructor Summary
ConfigMap(Config config)
          Constructor.
 
Method Summary
 java.util.Set entrySet()
          Unsupported.
 java.lang.Object get(java.lang.Object key)
          Delegates to Config.get().
 
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, put, putAll, remove, size, toString, values
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigMap

public ConfigMap(Config config)
Constructor.
Parameters:
config - The config.
Method Detail

entrySet

public java.util.Set entrySet()
Unsupported.
Overrides:
entrySet in class java.util.AbstractMap
Returns:
entrySet

get

public java.lang.Object get(java.lang.Object key)
Delegates to Config.get().
Overrides:
get in class java.util.AbstractMap
Parameters:
key - The key. Must be a string.
Returns:
The value.


Copyright © 2002-2004, Paul Strack. All Rights Reserved.