|
PCJ API Version 1.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection
bak.pcj.adapter.IntCollectionToCollectionAdapter
This class represents adaptions of primitive collections of int values to Java Collections Framework collections. The adapter is implemented as a wrapper around a primitive collection. Thus, changes to the underlying collection are reflected by this collection and vice versa.
IntCollection,
Collection| Field Summary | |
protected IntCollection |
collection
The underlying primitive collection. |
| Constructor Summary | |
IntCollectionToCollectionAdapter(IntCollection collection)
Creates a new adaption of a collection of int values to a Java Collections Framework collection. |
|
| Method Summary | |
boolean |
add(Object o)
Adds an element to this collection. |
void |
clear()
Clears this collection. |
boolean |
contains(Object o)
Indicates whether this collection contains a specified element. |
int |
hashCode()
Returns a hash code value for this collection. |
Iterator |
iterator()
Returns an iterator over this collection. |
boolean |
remove(Object o)
Removes a specified element from this collection. |
boolean |
removeAll(Collection c)
Removes all the elements of a specified collection from this collection. |
boolean |
retainAll(Collection c)
Retains only the elements of a specified collection in this collection. |
int |
size()
Returns the number of elements in this collection. |
| Methods inherited from class java.util.AbstractCollection |
addAll, containsAll, isEmpty, toArray, toArray, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
equals |
| Field Detail |
protected IntCollection collection
| Constructor Detail |
public IntCollectionToCollectionAdapter(IntCollection collection)
collection - the underlying primitive collection.
NullPointerException - if collection is null.| Method Detail |
public boolean add(Object o)
o - the element to add to this collection.
IllegalArgumentException - if o is null.
ClassCastException - if o is not of class Integer.
UnsupportedOperationException - if the operation is not supported by the
underlying collection.public void clear()
UnsupportedOperationException - if the operation is not supported by the
underlying collection.public boolean contains(Object o)
Note that this collection can never contain null
values or values of other classes than Integer.
In those cases, this method will return false.
o - the element to test for containment.
public Iterator iterator()
public boolean remove(Object o)
Note that this collection can never contain null
values or values of other classes than Integer.
In those cases, this method will return false.
o - the Integer value to remove from this collection.
UnsupportedOperationException - if the operation is not supported by the
underlying collection.public boolean removeAll(Collection c)
This method is only overridden to work
around a bug in AbstractCollection,
which does not throw a
NullPointerException when the
argument is null and the collection is empty.
c - the collection whose elements to remove from this
collection.
UnsupportedOperationException - if the operation is not supported by the underlying
collection.
NullPointerException - if c is null.public boolean retainAll(Collection c)
This method is only overridden to work
around a bug in AbstractCollection,
which does not throw a
NullPointerException when the
argument is null and the collection is empty.
c - the collection whose elements to retain in this
collection.
UnsupportedOperationException - if the operation is not supported by the underlying
collection.
NullPointerException - if c is null.public int size()
public int hashCode()
|
PCJ API Version 1.2 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||