|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.util.WeakIdentityCollection
public class WeakIdentityCollection
WeakIdentityCollection implements a Collection with weak values.
Equality of elements is tested using the == operator.
Iterator returned
by this collection might return null values. The same applies
to the method toArray() in both its variants.
| Constructor Summary | |
|---|---|
WeakIdentityCollection(int initialCapacity)
Creates a new WeakIdentityCollection. |
|
| Method Summary | |
|---|---|
boolean |
add(Object o)
Adds object o to this collection. |
boolean |
addAll(Collection c)
|
void |
clear()
Releases all references held by this collection. |
boolean |
contains(Object o)
Returns true if this collection contains o. |
boolean |
containsAll(Collection c)
|
boolean |
isEmpty()
Returns true if this collection is empty. |
Iterator |
iterator()
Returns an Iterator over the elements of this
collection. |
boolean |
remove(Object o)
Removes the object o from this collection if it is present. |
boolean |
removeAll(Collection c)
|
boolean |
retainAll(Collection c)
|
int |
size()
Returns the current size of this collection. |
Object[] |
toArray()
Returns an array containing all of the elements in this collection. |
Object[] |
toArray(Object[] a)
The returned array may contain null elements! |
| 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 |
|---|
equals, hashCode |
| Constructor Detail |
|---|
public WeakIdentityCollection(int initialCapacity)
initialCapacity - the initial capacity.| Method Detail |
|---|
public int size()
size in interface Collectionpublic boolean isEmpty()
true if this collection is empty.
isEmpty in interface Collectiontrue if this collection is empty.public void clear()
clear in interface Collectionpublic boolean add(Object o)
o to this collection.
add in interface Collectiono - the object to add.
true as this collection allows duplicates.
NullPointerException - if o is null.public boolean contains(Object o)
true if this collection contains o.
contains in interface Collectiono - element whose presence in this collection is to be tested.
true if this collection contains the specified
elementpublic boolean remove(Object o)
o from this collection if it is present.
remove in interface Collectiono - the object to remove.
true if this collection changed as a result of the
call.public boolean addAll(Collection c)
addAll in interface CollectionUnsupportedOperationException - always.public boolean containsAll(Collection c)
containsAll in interface CollectionUnsupportedOperationException - always.public boolean removeAll(Collection c)
removeAll in interface CollectionUnsupportedOperationException - always.public boolean retainAll(Collection c)
retainAll in interface CollectionUnsupportedOperationException - always.public Iterator iterator()
Iterator over the elements of this
collection. The returned iterator is not fail-fast. That is, it does
not throw a ConcurrentModificationException if this
collection is modified while iterating over the collection.
iterator in interface Iterableiterator in interface CollectionIterator over the elements of this
collection.public Object[] toArray()
null elements!
toArray in interface Collectionpublic Object[] toArray(Object[] a)
null elements!
toArray in interface Collection
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||