public class CollectionContainerPolicy extends InterfaceContainerPolicy
Purpose: A CollectionContainerPolicy is ContainerPolicy whose container class implements the Collection interface.
Responsibilities: Provide the functionality to operate on an instance of a Collection.
ContainerPolicy,
MapContainerPolicy,
Serialized FormcloneMethod, containerClass, containerClassNameconstructor, elementDescriptor| Constructor and Description |
|---|
CollectionContainerPolicy()
INTERNAL:
Construct a new policy.
|
CollectionContainerPolicy(java.lang.Class containerClass)
INTERNAL:
Construct a new policy for the specified class.
|
CollectionContainerPolicy(java.lang.String containerClassName)
INTERNAL:
Construct a new policy for the specified class name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addInto(java.lang.Object key,
java.lang.Object element,
java.lang.Object container)
INTERNAL:
Add element into a container which implements the Collection interface.
|
java.lang.Object |
buildContainerFromVector(java.util.Vector vector,
AbstractSession session)
INTERNAL:
Return a container populated with the contents of the specified Vector.
|
void |
clear(java.lang.Object container)
INTERNAL:
Remove all the elements from container.
|
protected boolean |
contains(java.lang.Object element,
java.lang.Object container)
INTERNAL:
Return the true if element exists in container.
|
java.lang.Class |
getInterfaceType() |
boolean |
hasOrder()
INTERNAL:
Return whether the collection has order.
|
boolean |
isCollectionPolicy() |
boolean |
isValidContainer(java.lang.Object container)
INTERNAL:
Validate the container type.
|
java.lang.Object |
iteratorFor(java.lang.Object container)
INTERNAL:
Return an iterator for the given container.
|
protected boolean |
removeFrom(java.lang.Object key,
java.lang.Object element,
java.lang.Object container)
INTERNAL:
Remove element from container which implements the Collection interface.
|
int |
sizeFor(java.lang.Object container)
INTERNAL:
Return the size of container.
|
cloneFor, convertClassNamesToClasses, getCloneMethod, getCloneMethod, getContainerClass, getContainerClassName, hasNext, invokeCloneMethodOn, isValidContainerType, next, setCloneMethod, setContainerClass, setContainerClassName, toStringInfoaddInto, addInto, addIntoWithOrder, addIntoWithOrder, addIntoWithOrder, buildPolicyFor, buildPolicyFor, clone, clone, compareCollectionsForChange, compareKeys, concatenateContainers, containerInstance, containerInstance, contains, containsKey, execute, getConstructor, getElementDescriptor, hasElementDescriptor, initializeConstructor, isCursoredStreamPolicy, isCursorPolicy, isCursorStreamPolicy, isDirectMapPolicy, isEmpty, isListPolicy, isMapPolicy, isScrollableCursorPolicy, keyFrom, mergeCascadeParts, mergeChanges, next, overridesRead, prepare, prepareForExecution, recordAddToCollectionInChangeRecord, recordRemoveFromCollectionInChangeRecord, remoteExecute, removeAllElements, removeFrom, removeFrom, removeFromWithOrder, setConstructor, setElementDescriptor, setKeyName, toString, validateElementAndRehashIfRequired, vectorForpublic CollectionContainerPolicy()
public CollectionContainerPolicy(java.lang.Class containerClass)
public CollectionContainerPolicy(java.lang.String containerClassName)
public boolean addInto(java.lang.Object key,
java.lang.Object element,
java.lang.Object container)
addInto in class ContainerPolicyelement - java.lang.Objectcontainer - java.lang.Objectpublic java.lang.Object buildContainerFromVector(java.util.Vector vector,
AbstractSession session)
buildContainerFromVector in class ContainerPolicypublic void clear(java.lang.Object container)
clear in class ContainerPolicycontainer - java.lang.Objectprotected boolean contains(java.lang.Object element,
java.lang.Object container)
contains in class ContainerPolicyelement - java.lang.Objectcontainer - java.lang.Objectpublic java.lang.Class getInterfaceType()
getInterfaceType in class InterfaceContainerPolicypublic boolean hasOrder()
hasOrder in class ContainerPolicypublic boolean isValidContainer(java.lang.Object container)
isValidContainer in class ContainerPolicyisValidContainer(Object),
MapContainerPolicy.isValidContainer(Object)public boolean isCollectionPolicy()
isCollectionPolicy in class ContainerPolicypublic java.lang.Object iteratorFor(java.lang.Object container)
iteratorFor in class ContainerPolicycontainer - java.lang.ObjectContainerPolicy.hasNext(java.lang.Object),
ContainerPolicy.next(java.lang.Object)protected boolean removeFrom(java.lang.Object key,
java.lang.Object element,
java.lang.Object container)
removeFrom in class ContainerPolicykey - java.lang.Object This param represents the key that would be used by this object in a map, may be nullelement - java.lang.Objectcontainer - java.lang.Objectpublic int sizeFor(java.lang.Object container)
sizeFor in class ContainerPolicyanObject - java.lang.Object