|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--serp.util.RefValueCollection
ReferenceCollection.
Abstract base class for collections whose values are stored as weak or soft references.
Subclasses must define the createRefValue(java.lang.Object, java.lang.ref.ReferenceQueue, boolean) method only. Expired
values are removed from the collection before any mutator methods;
removing before accessor methods can lead to
ConcurrentModificationExceptions. Thus, the following methods may
produce results which include values that have expired:
sizeisEmptyBy default, all methods are delegated to the internal collection
provided at construction. Thus, the ordering, etc of the given collection
will be preserved. A special case is also made for MapSets using
identity hashing, which is supported.
Performance is similar to that of the internal collection instance.
| Inner Class Summary | |
(package private) static interface |
RefValueCollection.RefValue
Deprecated. Represents a value held by weak or soft reference. |
| Constructor Summary | |
RefValueCollection()
Deprecated. Equivalent to RefValueCollection (new LinkedList ()). |
|
RefValueCollection(Collection coll)
Deprecated. Construct a RefCollection with the given interal collection. |
|
| Method Summary | |
boolean |
add(Object obj)
Deprecated. |
boolean |
add(Object obj,
boolean hard)
Deprecated. Add an object, with the option of adding it initially as a hard reference. |
boolean |
addAll(Collection objs)
Deprecated. |
boolean |
addAll(Collection objs,
boolean hard)
Deprecated. Add objects, with the option of adding them initially as hard references. |
void |
clear()
Deprecated. |
boolean |
contains(Object obj)
Deprecated. |
boolean |
containsAll(Collection objs)
Deprecated. |
protected abstract RefValueCollection.RefValue |
createRefValue(Object value,
ReferenceQueue queue,
boolean identity)
Deprecated. Create a weak or soft reference to hold the given value. |
boolean |
equals(Object other)
Deprecated. |
boolean |
isEmpty()
Deprecated. |
Iterator |
iterator()
Deprecated. |
boolean |
makeHard(Object obj)
Deprecated. Harden the reference for the given value. |
boolean |
makeReference(Object obj)
Deprecated. Soften the reference for the given value. |
boolean |
remove(Object obj)
Deprecated. |
boolean |
removeAll(Collection objs)
Deprecated. |
boolean |
retainAll(Collection objs)
Deprecated. |
int |
size()
Deprecated. |
Object[] |
toArray()
Deprecated. |
Object[] |
toArray(Object[] a)
Deprecated. |
| Methods inherited from class java.lang.Object |
|
| Methods inherited from interface java.util.Collection |
hashCode |
| Constructor Detail |
public RefValueCollection()
RefValueCollection (new LinkedList ()).public RefValueCollection(Collection coll)
TreeSet, the elements will be maintained in natural
order and will not allow duplicates.| Method Detail |
public boolean makeHard(Object obj)
RefCollectionConcurrentModificationExceptions being
thrown by any iterator in use while this method is called.makeHard in interface RefCollectionserp.util.RefCollectionpublic boolean makeReference(Object obj)
RefCollectionConcurrentModificationExceptions being thrown by any
iterator in use while this method is called.makeReference in interface RefCollectionserp.util.RefCollectionpublic boolean add(Object obj)
add in interface Collection
public boolean add(Object obj,
boolean hard)
RefCollectionadd in interface RefCollectionpublic boolean addAll(Collection objs)
addAll in interface Collection
public boolean addAll(Collection objs,
boolean hard)
RefCollectionaddAll in interface RefCollectionpublic void clear()
clear in interface Collectionpublic boolean contains(Object obj)
contains in interface Collectionpublic boolean containsAll(Collection objs)
containsAll in interface Collectionpublic boolean equals(Object other)
equals in interface Collectionequals in class Objectpublic boolean isEmpty()
isEmpty in interface Collectionpublic boolean remove(Object obj)
remove in interface Collectionpublic boolean removeAll(Collection objs)
removeAll in interface Collectionpublic boolean retainAll(Collection objs)
retainAll in interface Collectionpublic int size()
size in interface Collectionpublic Object[] toArray()
toArray in interface Collectionpublic Object[] toArray(Object[] a)
toArray in interface Collectionpublic Iterator iterator()
iterator in interface Collection
protected abstract RefValueCollection.RefValue createRefValue(Object value,
ReferenceQueue queue,
boolean identity)
Object.equals(java.lang.Object),
Object.hashCode(), and {#link Comparable#compareTo} methods
will be delegated to the given value.value - the value to hold; will not be nullqueue - the reference queue to place the reference in, or
null if the reference should not be placed in a
queueidentity - if true, the Object.equals(java.lang.Object) and
Object.hashCode() methods of the returned
reference should work by the JVM identity of the
value, not its corresponding methods
|
SolarMetric Kodo JDO 2.5.8 generated on January 11 2004 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||