org.pf.osf
Class ExtendedMap

java.lang.Object
  extended by org.pf.util.MapWrapper
      extended by org.pf.osf.ExtendedMap
All Implemented Interfaces:
java.io.Serializable, java.util.Map, AttributeReadAccess, AttributeReadWriteAccess

public class ExtendedMap
extends MapWrapper
implements AttributeReadWriteAccess

Provides map wrapper that additionally implements the interface AttributeReadWriteAccess to enable OSF generif search functionality on the inner (wrapped) map.

Version:
1.0
Author:
M.Duchrow
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry<K,V>
 
Constructor Summary
ExtendedMap()
          Initialize the new instance with default values.
ExtendedMap(java.util.Map map)
          Initialize the new instance with an inner map.
 
Method Summary
 java.lang.String[] getAttributeNames()
          Returns the names of all attributes that can be accessed by the method getAttributeValue().
 java.lang.Object getAttributeValue(java.lang.String name)
          Returns the current value of the attribute with the given name.
 void setAttributeValue(java.lang.String name, java.lang.Object value)
          Sets the current value of the attribute with the given name.
 
Methods inherited from class org.pf.util.MapWrapper
clear, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, 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

ExtendedMap

public ExtendedMap()
Initialize the new instance with default values.


ExtendedMap

public ExtendedMap(java.util.Map map)
Initialize the new instance with an inner map.

Parameters:
map - The map this map wrapper is based on
Method Detail

setAttributeValue

public void setAttributeValue(java.lang.String name,
                              java.lang.Object value)
                       throws java.lang.NoSuchFieldException
Description copied from interface: AttributeReadWriteAccess
Sets the current value of the attribute with the given name.

Specified by:
setAttributeValue in interface AttributeReadWriteAccess
Parameters:
name - The attribute's name ( case sensitive )
value - The value to be put into the attributes 'slot'
Throws:
java.lang.NoSuchFieldException - If there is no attribute with the given name
See Also:
AttributeReadWriteAccess.setAttributeValue(java.lang.String, java.lang.Object)

getAttributeNames

public java.lang.String[] getAttributeNames()
Description copied from interface: AttributeReadAccess
Returns the names of all attributes that can be accessed by the method getAttributeValue().

Specified by:
getAttributeNames in interface AttributeReadAccess
See Also:
AttributeReadAccess.getAttributeNames()

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String name)
                                   throws java.lang.NoSuchFieldException
Description copied from interface: AttributeReadAccess
Returns the current value of the attribute with the given name.

Specified by:
getAttributeValue in interface AttributeReadAccess
Parameters:
name - The attribute's name ( case sensitive )
Throws:
java.lang.NoSuchFieldException - If there is no attribute with the given name
See Also:
AttributeReadAccess.getAttributeValue(java.lang.String)