org.milyn.scribe
Class MapObjectStore

java.lang.Object
  extended by org.milyn.scribe.MapObjectStore
All Implemented Interfaces:
ObjectStore

public class MapObjectStore
extends Object
implements ObjectStore

A Map implementation of the ObjectStore.

Author:
maurice.zeijen@smies.com

Constructor Summary
MapObjectStore()
           
 
Method Summary
 Object get(Object key)
          Returns the object bound with the specified name in this ObjectStore implementation, or null if no object is bound under the name.
 Map<Object,Object> getAll()
          Returns the Map of attributes bound in this ObjectStore
 void remove(Object key)
          Removes the object bound with the specified name from this ObjectStore implementation.
 void set(Object key, Object value)
          Binds an object to this ObjectStore implementation, using the name specified.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapObjectStore

public MapObjectStore()
Method Detail

get

public Object get(Object key)
Description copied from interface: ObjectStore
Returns the object bound with the specified name in this ObjectStore implementation, or null if no object is bound under the name.

Specified by:
get in interface ObjectStore
Parameters:
key - The key against which the object is bound; cannot be null.
Returns:
The object bound with the specified name in this ObjectStore implementation, or null if no object is bound under the name.

getAll

public Map<Object,Object> getAll()
Description copied from interface: ObjectStore
Returns the Map of attributes bound in this ObjectStore

Specified by:
getAll in interface ObjectStore
Returns:
Map of all objects bound in this ObjectStore

remove

public void remove(Object key)
Description copied from interface: ObjectStore
Removes the object bound with the specified name from this ObjectStore implementation. If the ObjectStoree implementation does not have an object bound with the specified name, this method does nothing.

Specified by:
remove in interface ObjectStore
Parameters:
key - The key against which the object is bound; cannot be null.

set

public void set(Object key,
                Object value)
Description copied from interface: ObjectStore
Binds an object to this ObjectStore implementation, using the name specified. If an object of the same name is already bound, the object is replaced.

Specified by:
set in interface ObjectStore
Parameters:
key - The key against which the object is bound; cannot be null.
value - The object to be bound; cannot be null.


Copyright © 2014. All Rights Reserved.