org.bsf.smartValueObject.container
Class SmartCollection

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

public class SmartCollection
extends AbstractSmartContainer
implements java.util.Collection

A smart wrapper class around java.util.Collection.

See Also:
SmartContainer, Collection, Serialized Form

Field Summary
private  java.util.Collection coll
           
 
Fields inherited from class org.bsf.smartValueObject.container.AbstractSmartContainer
 
Constructor Summary
SmartCollection(java.util.Collection c, org.bsf.smartValueObject.Versionable v)
           
 
Method Summary
 boolean addAll(java.util.Collection c)
           
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.
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.
 boolean containsAll(java.util.Collection c)
           
 java.lang.Object getContainer()
          Gets the backing container containing all elements.
protected  java.lang.Object getFromContainer(java.lang.Object key)
          Gets object from container.
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
protected  boolean removeFromContainer(java.lang.Object o)
          Removes object from container.
protected  java.lang.Object removeKeyFromContainer(java.lang.Object key)
          Removes key from container.
 boolean retainAll(java.util.Collection c)
           
protected  java.lang.Object[] toObjectArray()
          Retrieves objects as an array.
 
Methods inherited from class org.bsf.smartValueObject.container.AbstractSmartContainer
add, addObject, addObject, clear, 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.Collection
add, clear, contains, equals, hashCode, isEmpty, iterator, size, toArray, toArray
 

Field Detail

coll

private java.util.Collection coll
Constructor Detail

SmartCollection

public SmartCollection(java.util.Collection c,
                       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 boolean remove(java.lang.Object o)
Specified by:
remove in interface java.util.Collection

containsAll

public boolean containsAll(java.util.Collection c)
Specified by:
containsAll in interface java.util.Collection

addAll

public boolean addAll(java.util.Collection c)
Specified by:
addAll in interface java.util.Collection

removeAll

public boolean removeAll(java.util.Collection c)
Specified by:
removeAll in interface java.util.Collection

retainAll

public boolean retainAll(java.util.Collection c)
Specified by:
retainAll in interface java.util.Collection