org.bsf.smartValueObject.container
Class SmartMap

java.lang.Object
  |
  +--org.bsf.smartValueObject.container.AbstractSmartContainer
        |
        +--org.bsf.smartValueObject.container.SmartMap
All Implemented Interfaces:
java.util.Map, java.io.Serializable, SmartContainer, Versionable

public class SmartMap
extends AbstractSmartContainer
implements java.util.Map

A smart wrapper class around java.util.Map.

See Also:
SmartContainer, Map, Serialized Form

Field Summary
private  java.util.Map map
           
 
Fields inherited from class org.bsf.smartValueObject.container.AbstractSmartContainer
 
Constructor Summary
SmartMap(java.util.Map m, org.bsf.smartValueObject.Versionable v)
           
 
Method Summary
protected  boolean addToContainer(java.lang.Object o)
          Add object to container.
protected  java.lang.Object addToContainer(java.lang.Object key, java.lang.Object o)
          Adds object to container with key.
 void clear()
          Overrides baseclass with a specialized method.
protected  void containerClear()
          Deletes all elements from the container.
protected  boolean containerContains(java.lang.Object o)
          Verifies if the container has the specified object.
protected  boolean containerContainsKey(java.lang.Object key)
          Verifies if the container has the specified key.
protected  java.util.Iterator containerIterator()
          Gets the standard iterator for this container.
protected  int containerSize()
          The 'raw' size of the container.
 java.util.Set entrySet()
           
 java.lang.Object getContainer()
          Gets the backing container containing all elements.
protected  java.lang.Object getFromContainer(java.lang.Object key)
          Gets object from container.
 java.util.Set keySet()
           
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
protected  boolean removeFromContainer(java.lang.Object o)
          Removes object from container.
protected  java.lang.Object removeKeyFromContainer(java.lang.Object key)
          Removes key from container.
protected  java.lang.Object[] toObjectArray()
          Retrieves objects as an array.
 java.util.Collection values()
           
 
Methods inherited from class org.bsf.smartValueObject.container.AbstractSmartContainer
add, addObject, addObject, contains, containsKey, containsObject, containsValue, create, delete, get, getCreated, getDeleted, getIterator, getVersionId, isCreated, isDeleted, isDirty, isEmpty, iterator, markClean, put, removeObject, removeObjectByKey, setVersionId, size, toArray, toArray, touch, touch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
containsKey, containsValue, equals, get, hashCode, isEmpty, put, size
 

Field Detail

map

private java.util.Map map
Constructor Detail

SmartMap

public SmartMap(java.util.Map m,
                org.bsf.smartValueObject.Versionable v)
Method Detail

addToContainer

protected boolean addToContainer(java.lang.Object o)
Description copied from class: AbstractSmartContainer
Add object to container.

Specified by:
addToContainer in class AbstractSmartContainer
Parameters:
o - the object to be added.
Returns:

addToContainer

protected java.lang.Object addToContainer(java.lang.Object key,
                                          java.lang.Object o)
Description copied from class: AbstractSmartContainer
Adds object to container with key.

Specified by:
addToContainer in class AbstractSmartContainer
Parameters:
key - the key to use.
o - the object to be added.
Returns:

getFromContainer

protected java.lang.Object getFromContainer(java.lang.Object key)
Description copied from class: AbstractSmartContainer
Gets object from container.

Specified by:
getFromContainer in class AbstractSmartContainer
Parameters:
key - the key of the object.
Returns:

removeFromContainer

protected boolean removeFromContainer(java.lang.Object o)
Description copied from class: AbstractSmartContainer
Removes object from container.

Specified by:
removeFromContainer in class AbstractSmartContainer
Parameters:
o - the object to be removed.
Returns:

removeKeyFromContainer

protected java.lang.Object removeKeyFromContainer(java.lang.Object key)
Description copied from class: AbstractSmartContainer
Removes key from container.

Specified by:
removeKeyFromContainer in class AbstractSmartContainer
Parameters:
key - the key to be removed.
Returns:

containerContains

protected boolean containerContains(java.lang.Object o)
Description copied from class: AbstractSmartContainer
Verifies if the container has the specified object.

Specified by:
containerContains in class AbstractSmartContainer
Parameters:
o -
Returns:

containerContainsKey

protected boolean containerContainsKey(java.lang.Object key)
Description copied from class: AbstractSmartContainer
Verifies if the container has the specified key.

Specified by:
containerContainsKey in class AbstractSmartContainer
Parameters:
key -
Returns:

containerSize

protected int containerSize()
Description copied from class: AbstractSmartContainer
The 'raw' size of the container.

Specified by:
containerSize in class AbstractSmartContainer
Returns:
size of the container.

containerIterator

protected java.util.Iterator containerIterator()
Description copied from class: AbstractSmartContainer
Gets the standard iterator for this container.

Specified by:
containerIterator in class AbstractSmartContainer
Returns:
iterator.

containerClear

protected void containerClear()
Description copied from class: AbstractSmartContainer
Deletes all elements from the container.

Specified by:
containerClear in class AbstractSmartContainer

toObjectArray

protected java.lang.Object[] toObjectArray()
Description copied from class: AbstractSmartContainer
Retrieves objects as an array.

Specified by:
toObjectArray in class AbstractSmartContainer
Returns:

getContainer

public java.lang.Object getContainer()
Description copied from interface: SmartContainer
Gets the backing container containing all elements.

Specified by:
getContainer in interface SmartContainer
Specified by:
getContainer in class AbstractSmartContainer
Returns:
the underlying container.

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map

keySet

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

values

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

entrySet

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

clear

public void clear()
Overrides baseclass with a specialized method.

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