org.pf.osf
Class MapFacade

java.lang.Object
  extended by org.pf.osf.MapFacade
All Implemented Interfaces:
java.util.Map

public class MapFacade
extends java.lang.Object
implements java.util.Map

This is a wrapper class around AttributeReadAccess objects. It provides the Map interface to allow generic access to the attributes of such an object.

Version:
1.1
Author:
M.Duchrow

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
MapFacade(AttributeReadAccess object)
          Initialize the new instance with an object to apply the Map interface on.
 
Method Summary
 void clear()
          NOT SUPPORTED
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map map)
           
 java.lang.Object remove(java.lang.Object key)
          NOT SUPPORTED
 void setObject(AttributeReadAccess object)
          Replaces the underlying object.
 int size()
           
 java.util.Collection values()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

MapFacade

public MapFacade(AttributeReadAccess object)
Initialize the new instance with an object to apply the Map interface on.

Throws:
java.lang.IllegalArgumentException - If the given object is null
Method Detail

setObject

public void setObject(AttributeReadAccess object)
Replaces the underlying object. The given object must not be null.

Parameters:
object - The object to be wrapped by this MapFacade
Throws:
java.lang.IllegalArgumentException - If the given object is null

clear

public void clear()
NOT SUPPORTED

Specified by:
clear in interface java.util.Map
See Also:
Map.clear()

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(java.lang.Object value)
Specified by:
containsValue in interface java.util.Map
See Also:
Map.containsValue(java.lang.Object)

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map
See Also:
Map.entrySet()

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
See Also:
Map.get(java.lang.Object)

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map
See Also:
Map.isEmpty()

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map
See Also:
Map.keySet()

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map
See Also:
Map.put(java.lang.Object, java.lang.Object)

putAll

public void putAll(java.util.Map map)
Specified by:
putAll in interface java.util.Map
See Also:
Map.putAll(java.util.Map)

remove

public java.lang.Object remove(java.lang.Object key)
NOT SUPPORTED

Specified by:
remove in interface java.util.Map
See Also:
Map.remove(java.lang.Object)

size

public int size()
Specified by:
size in interface java.util.Map
See Also:
Map.size()

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map
See Also:
Map.values()