org.apache.sling.event
Class EventPropertiesMap

java.lang.Object
  extended by java.util.Dictionary<String,Object>
      extended by org.apache.sling.event.EventPropertiesMap
All Implemented Interfaces:
Serializable, Map<String,Object>

public class EventPropertiesMap
extends Dictionary<String,Object>
implements Map<String,Object>, Serializable

An implementation of a map that helps in dealing with properties of an OSGi event. This map implements both, the map and the dictionary interfaces.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Constructor Summary
EventPropertiesMap()
          Construct a new map.
EventPropertiesMap(org.osgi.service.event.Event event)
          Construct a new map out of an event object.
EventPropertiesMap(Map<String,Object> props)
          Construct a new map out of another map.
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Enumeration<Object> elements()
           
 Set<Map.Entry<String,Object>> entrySet()
           
 boolean equals(Object o)
           
 Object get(Object key)
           
 int hashCode()
           
 boolean isEmpty()
           
 Enumeration<String> keys()
           
 Set<String> keySet()
           
 Object put(String key, Object value)
           
 void putAll(Map<? extends String,? extends Object> t)
           
 Object remove(Object key)
           
 int size()
           
 String toString()
           
 Collection<Object> values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EventPropertiesMap

public EventPropertiesMap(org.osgi.service.event.Event event)
Construct a new map out of an event object. The resulting map is modifiable. But any modification has no influence on the original properties of the event!

Parameters:
event - The event object.

EventPropertiesMap

public EventPropertiesMap(Map<String,Object> props)
Construct a new map out of another map.

Parameters:
props - The properties map object.

EventPropertiesMap

public EventPropertiesMap()
Construct a new map.

Method Detail

clear

public void clear()
Specified by:
clear in interface Map<String,Object>
See Also:
Map.clear()

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map<String,Object>
See Also:
Map.containsKey(java.lang.Object)

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map<String,Object>
See Also:
Map.containsValue(java.lang.Object)

entrySet

public Set<Map.Entry<String,Object>> entrySet()
Specified by:
entrySet in interface Map<String,Object>
See Also:
Map.entrySet()

equals

public boolean equals(Object o)
Specified by:
equals in interface Map<String,Object>
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

get

public Object get(Object key)
Specified by:
get in interface Map<String,Object>
Specified by:
get in class Dictionary<String,Object>
See Also:
Dictionary.get(java.lang.Object)

hashCode

public int hashCode()
Specified by:
hashCode in interface Map<String,Object>
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map<String,Object>
Specified by:
isEmpty in class Dictionary<String,Object>
See Also:
Dictionary.isEmpty()

keySet

public Set<String> keySet()
Specified by:
keySet in interface Map<String,Object>
See Also:
Map.keySet()

put

public Object put(String key,
                  Object value)
Specified by:
put in interface Map<String,Object>
Specified by:
put in class Dictionary<String,Object>
See Also:
Dictionary.put(java.lang.Object, java.lang.Object)

putAll

public void putAll(Map<? extends String,? extends Object> t)
Specified by:
putAll in interface Map<String,Object>
See Also:
Map.putAll(java.util.Map)

remove

public Object remove(Object key)
Specified by:
remove in interface Map<String,Object>
Specified by:
remove in class Dictionary<String,Object>
See Also:
Dictionary.remove(java.lang.Object)

size

public int size()
Specified by:
size in interface Map<String,Object>
Specified by:
size in class Dictionary<String,Object>
See Also:
Dictionary.size()

values

public Collection<Object> values()
Specified by:
values in interface Map<String,Object>
See Also:
Map.values()

elements

public Enumeration<Object> elements()
Specified by:
elements in class Dictionary<String,Object>
See Also:
Dictionary.elements()

keys

public Enumeration<String> keys()
Specified by:
keys in class Dictionary<String,Object>
See Also:
Dictionary.keys()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


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