org.objectweb.speedo.genclass.collection
Class CollectionImpl

java.lang.Object
  extended by org.objectweb.speedo.genclass.GenClass
      extended by org.objectweb.speedo.genclass.collection.CollectionImpl
All Implemented Interfaces:
java.io.Serializable, java.lang.Iterable, java.util.Collection, org.objectweb.jorm.api.PBinding, org.objectweb.jorm.api.PBindingCtrl, org.objectweb.jorm.util.api.Loggable, CacheEntry, FixableCacheEntry, ReplaceableCacheEntry, SpeedoGenClassCoherence, SpeedoGenClassPO, SpeedoGenClassSerializable, PersistentObjectItf
Direct Known Subclasses:
ListImpl, SetImpl

public class CollectionImpl
extends GenClass
implements java.util.Collection

This class is an implementation of the java.util.Collection interface.

Author:
Eric.Bruneton, S.Chassande-Barrioz
See Also:
Serialized Form

Field Summary
protected static int DEFAULT_SIZE
           
 
Fields inherited from class org.objectweb.speedo.genclass.GenClass
age, encodedPName, fix, gcid, linkedField, listeners, logger, mapperName, pbinding, pnameHints, projectName, ptype, speedoIsActive
 
Fields inherited from interface org.objectweb.jorm.api.PBinding
ACTION_BIND, ACTION_EXIST, ACTION_EXPORT, ACTION_READ, ACTION_UNBIND, ACTION_UNEXPORT, ACTION_WRITE, LIFECYCLE_ACTIVEFORIO, LIFECYCLE_DELTOWRITE, LIFECYCLE_ERROR, LIFECYCLE_NEWTOWRITE, LIFECYCLE_NOTBOUND
 
Constructor Summary
CollectionImpl()
          Instanciates and initializes a new collection with an initial size.
 
Method Summary
 boolean add(java.lang.Object o)
           
 boolean addAll(java.util.Collection c)
           
 void clear()
           
 boolean contains(java.lang.Object o)
           
 boolean containsAll(java.util.Collection c)
           
 java.lang.Object createGenClass()
           
 boolean equals(java.lang.Object o)
           
 boolean isEmpty()
           
 java.util.Iterator iterator()
           
 boolean remove(java.lang.Object o)
           
 boolean removeAll(java.util.Collection c)
           
 boolean retainAll(java.util.Collection c)
           
 int size()
           
 StateItf speedoCreateState()
           
 StateItf speedoGetReferenceState()
           
 void speedoSetReferenceState(StateItf refAcc)
          Assignes the reference accessor to the PersistentObjectItf The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.
 java.lang.Object[] toArray()
           
 java.lang.Object[] toArray(java.lang.Object[] a)
           
 
Methods inherited from class org.objectweb.speedo.genclass.GenClass
bind, elementIsReference, exist, export, export, fireSpeedoElementAdded, fireSpeedoElementRemoved, fixCe, getCeAge, getCeFixCount, getCeIdentifier, getCeObject, getDataIdentifier, getDataIdentifiers, getLogger, getLoggerFactory, getPClassMapping, getPName, getSpeedoAccessors, getStatus, init, init, read, read, read, removeSpeedoAccessor, setCeAge, setElements, setLogger, setLoggerFactory, setPName, setStatus, speedoAdd, speedoAdd, speedoAddGenClassListener, speedoCopyState, speedoGetEncodedPName, speedoGetGenClassId, speedoGetHome, speedoGetPBinding, speedoGetPNameHints, speedoGetPOManager, speedoGetPType, speedoGetState, speedoIsActive, speedoIsActive, speedoIsPersistent, speedoRemove, speedoSetEncodedPName, speedoSetGcId, speedoSetLinkedField, speedoSetPBinding, speedoSetPNameHints, speedoSetPType, unbind, unexport, unfixCe, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Collection
hashCode
 

Field Detail

DEFAULT_SIZE

protected static final int DEFAULT_SIZE
See Also:
Constant Field Values
Constructor Detail

CollectionImpl

public CollectionImpl()
Instanciates and initializes a new collection with an initial size.

Method Detail

add

public boolean add(java.lang.Object o)
Specified by:
add in interface java.util.Collection

addAll

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

clear

public void clear()
Specified by:
clear in interface java.util.Collection
Specified by:
clear in interface SpeedoGenClassPO

contains

public boolean contains(java.lang.Object o)
Specified by:
contains in interface java.util.Collection

containsAll

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

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Collection
Overrides:
equals in class java.lang.Object

isEmpty

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

iterator

public java.util.Iterator iterator()
Specified by:
iterator in interface java.lang.Iterable
Specified by:
iterator in interface java.util.Collection

remove

public boolean remove(java.lang.Object o)
Specified by:
remove 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

size

public int size()
Specified by:
size in interface java.util.Collection

toArray

public java.lang.Object[] toArray()
Specified by:
toArray in interface java.util.Collection

toArray

public java.lang.Object[] toArray(java.lang.Object[] a)
Specified by:
toArray in interface java.util.Collection

speedoCreateState

public StateItf speedoCreateState()
Specified by:
speedoCreateState in interface PersistentObjectItf
Specified by:
speedoCreateState in class GenClass
Returns:
a new StateItf instance.

createGenClass

public java.lang.Object createGenClass()
Specified by:
createGenClass in interface SpeedoGenClassPO

speedoGetReferenceState

public StateItf speedoGetReferenceState()
Specified by:
speedoGetReferenceState in interface PersistentObjectItf
Specified by:
speedoGetReferenceState in class GenClass
Returns:
the reference accessor of the PersistentObjectItf instance. It can be * null. The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.

speedoSetReferenceState

public void speedoSetReferenceState(StateItf refAcc)
Description copied from interface: PersistentObjectItf
Assignes the reference accessor to the PersistentObjectItf The Reference accessor is used for non persistent instance, as cache value and for pessimistic policy.

Specified by:
speedoSetReferenceState in interface PersistentObjectItf
Specified by:
speedoSetReferenceState in class GenClass
Parameters:
refAcc - the new reference accessor