org.apache.felix.scr.impl.helper
Class ReadOnlyDictionary

java.lang.Object
  extended by java.util.Dictionary
      extended by org.apache.felix.scr.impl.helper.ReadOnlyDictionary
All Implemented Interfaces:
Map

public class ReadOnlyDictionary
extends Dictionary
implements Map

The ReadOnlyDictionary is both a Dictionary and a Map whose modificaiton methods (like put(Object, Object), remove(Object), etc.) have no effect.


Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry
 
Constructor Summary
ReadOnlyDictionary(Dictionary delegatee)
          Creates a wrapper for the given delegatee dictionary providing read only access to the data.
ReadOnlyDictionary(ServiceReference serviceReference)
          Creates a wrapper for the given service reference providing read only access to the reference properties.
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Enumeration elements()
           
 Set entrySet()
           
 Object get(Object key)
           
 boolean isEmpty()
           
 Enumeration keys()
           
 Set keySet()
           
 Object put(Object key, Object value)
          This method has no effect and always returns null as this instance is read-only and cannot modify and properties.
 void putAll(Map m)
           
 Object remove(Object key)
          This method has no effect and always returns null as this instance is read-only and cannot modify and properties.
 int size()
           
 String toString()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

ReadOnlyDictionary

public ReadOnlyDictionary(Dictionary delegatee)
Creates a wrapper for the given delegatee dictionary providing read only access to the data.


ReadOnlyDictionary

public ReadOnlyDictionary(ServiceReference serviceReference)
Creates a wrapper for the given service reference providing read only access to the reference properties.

Method Detail

elements

public Enumeration elements()
Specified by:
elements in class Dictionary

get

public Object get(Object key)
Specified by:
get in interface Map
Specified by:
get in class Dictionary

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map
Specified by:
isEmpty in class Dictionary

keys

public Enumeration keys()
Specified by:
keys in class Dictionary

put

public Object put(Object key,
                  Object value)
This method has no effect and always returns null as this instance is read-only and cannot modify and properties.

Specified by:
put in interface Map
Specified by:
put in class Dictionary

remove

public Object remove(Object key)
This method has no effect and always returns null as this instance is read-only and cannot modify and properties.

Specified by:
remove in interface Map
Specified by:
remove in class Dictionary

size

public int size()
Specified by:
size in interface Map
Specified by:
size in class Dictionary

toString

public String toString()
Overrides:
toString in class Object

clear

public void clear()
Specified by:
clear in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

putAll

public void putAll(Map m)
Specified by:
putAll in interface Map

values

public Collection values()
Specified by:
values in interface Map


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.