|
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
ConcurrentModificationException
s. Thus, the following methods may
produce results which include values that have expired:
size
isEmpty
By 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 MapSet
s 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)
RefCollection
ConcurrentModificationException
s being
thrown by any iterator in use while this method is called.makeHard
in interface RefCollection
serp.util.RefCollection
public boolean makeReference(Object obj)
RefCollection
ConcurrentModificationException
s being thrown by any
iterator in use while this method is called.makeReference
in interface RefCollection
serp.util.RefCollection
public boolean add(Object obj)
add
in interface Collection
public boolean add(Object obj, boolean hard)
RefCollection
add
in interface RefCollection
public boolean addAll(Collection objs)
addAll
in interface Collection
public boolean addAll(Collection objs, boolean hard)
RefCollection
addAll
in interface RefCollection
public void clear()
clear
in interface Collection
public boolean contains(Object obj)
contains
in interface Collection
public boolean containsAll(Collection objs)
containsAll
in interface Collection
public boolean equals(Object other)
equals
in interface Collection
equals
in class Object
public boolean isEmpty()
isEmpty
in interface Collection
public boolean remove(Object obj)
remove
in interface Collection
public boolean removeAll(Collection objs)
removeAll
in interface Collection
public boolean retainAll(Collection objs)
retainAll
in interface Collection
public int size()
size
in interface Collection
public Object[] toArray()
toArray
in interface Collection
public Object[] toArray(Object[] a)
toArray
in interface Collection
public 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 |