|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.WeakHashMap.Values
| Constructor Summary | |
private |
WeakHashMap.Values()
|
| Method Summary | |
void |
clear()
Removes all of the elements from this collection (optional operation). |
boolean |
contains(Object o)
Returns true if this collection contains the specified element. |
Iterator |
iterator()
Returns an iterator over the elements contained in this collection. |
int |
size()
Returns the number of elements in this collection. |
Object[] |
toArray()
Returns an array containing all of the elements in this collection. |
Object[] |
toArray(Object[] a)
Returns an array containing all of the elements in this collection; the runtime type of the returned array is that of the specified array. |
| Methods inherited from class java.util.AbstractCollection |
add, addAll, containsAll, isEmpty, remove, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
equals, hashCode |
| Constructor Detail |
private WeakHashMap.Values()
| Method Detail |
public Iterator iterator()
AbstractCollection
iterator in interface Collectioniterator in class AbstractCollectionpublic int size()
AbstractCollection
size in interface Collectionsize in class AbstractCollectionpublic boolean contains(Object o)
AbstractCollectionThis implementation iterates over the elements in the collection, checking each element in turn for equality with the specified element.
contains in interface Collectioncontains in class AbstractCollectiono - object to be checked for containment in this collection.
public void clear()
AbstractCollectionThis implementation iterates over this collection, removing each element using the Iterator.remove operation. Most implementations will probably choose to override this method for efficiency.
Note that this implementation will throw an UnsupportedOperationException if the iterator returned by this collection's iterator method does not implement the remove method and this collection is non-empty.
clear in interface Collectionclear in class AbstractCollectionpublic Object[] toArray()
AbstractCollectionThis implementation allocates the array to be returned, and iterates over the elements in the collection, storing each object reference in the next consecutive element of the array, starting with element 0.
toArray in interface CollectiontoArray in class AbstractCollectionpublic Object[] toArray(Object[] a)
AbstractCollectionIf the collection fits in the specified array with room to spare (i.e., the array has more elements than the collection), the element in the array immediately following the end of the collection is set to null. This is useful in determining the length of the collection only if the caller knows that the collection does not contain any null elements.)
If this collection makes any guarantees as to what order its elements are returned by its iterator, this method must return the elements in the same order.
This implementation checks if the array is large enough to contain the collection; if not, it allocates a new array of the correct size and type (using reflection). Then, it iterates over the collection, storing each object reference in the next consecutive element of the array, starting with element 0. If the array is larger than the collection, a null is stored in the first location after the end of the collection.
toArray in interface CollectiontoArray in class AbstractCollectiona - the array into which the elements of the collection are to
be stored, if it is big enough; otherwise, a new array of the
same runtime type is allocated for this purpose.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||