|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bak.pcj.UnmodifiableIntCollection
This class represents unmodifiable collections of int values.
Collections.unmodifiableCollection(java.util.Collection)
Field Summary | |
protected IntCollection |
collection
The collection underlying this unmodifiable collection. |
Constructor Summary | |
UnmodifiableIntCollection(IntCollection c)
Creates a new unmodifiable collection on an existing collection. |
Method Summary | |
boolean |
add(int v)
Throws UnsupportedOperationException. |
boolean |
addAll(IntCollection c)
Throws UnsupportedOperationException. |
void |
clear()
Throws UnsupportedOperationException. |
boolean |
contains(int v)
Indicates whether this collection contains a specified element. |
boolean |
containsAll(IntCollection c)
Indicates whether all elements of a specified collection is contained in this collection. |
boolean |
equals(Object obj)
Indicates whether this collection is equal to some object. |
int |
hashCode()
Returns a hash code value for this collection. |
boolean |
isEmpty()
Indicates whether this collection is empty. |
IntIterator |
iterator()
Returns an iterator over this collection. |
boolean |
remove(int v)
Throws UnsupportedOperationException. |
boolean |
removeAll(IntCollection c)
Throws UnsupportedOperationException. |
boolean |
retainAll(IntCollection c)
Throws UnsupportedOperationException. |
int |
size()
Returns the number of elements in this collection. |
int[] |
toArray()
Returns the elements of this collection as an array. |
int[] |
toArray(int[] a)
Returns the elements of this collection as an array. |
void |
trimToSize()
Minimizes the memory used by this collection. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected IntCollection collection
Constructor Detail |
public UnmodifiableIntCollection(IntCollection c)
c
- the existing collection to make unmodifiable.
NullPointerException
- if c is null.Method Detail |
public boolean add(int v)
add
in interface IntCollection
v
- the element to add to this collection.
UnsupportedOperationException
- unconditionally.IntCollection.addAll(IntCollection)
public boolean addAll(IntCollection c)
addAll
in interface IntCollection
c
- the collection whose elements to add to this
collection.
UnsupportedOperationException
- unconditionally.IntCollection.add(int)
public void clear()
clear
in interface IntCollection
UnsupportedOperationException
- unconditionally.public boolean contains(int v)
IntCollection
contains
in interface IntCollection
v
- the element to test for containment.
IntCollection.containsAll(IntCollection)
public boolean containsAll(IntCollection c)
IntCollection
containsAll
in interface IntCollection
c
- the collection whose elements to test for
containment.
IntCollection.contains(int)
public boolean equals(Object obj)
IntCollection
equals
in interface IntCollection
public int hashCode()
IntCollection
hashCode
in interface IntCollection
public boolean isEmpty()
IntCollection
isEmpty
in interface IntCollection
public IntIterator iterator()
IntCollection
iterator
in interface IntCollection
public boolean remove(int v)
remove
in interface IntCollection
v
- the int value to remove from this collection.
UnsupportedOperationException
- unconditionally.public boolean removeAll(IntCollection c)
removeAll
in interface IntCollection
c
- the collection whose elements to remove from this
collection.
UnsupportedOperationException
- unconditionally.public boolean retainAll(IntCollection c)
retainAll
in interface IntCollection
c
- the collection whose elements to retain in this
collection.
UnsupportedOperationException
- unconditionally.public int size()
IntCollection
size
in interface IntCollection
public int[] toArray()
IntCollection
toArray
in interface IntCollection
public int[] toArray(int[] a)
IntCollection
toArray
in interface IntCollection
a
- an array to fill with the elements of this
collection; if a is null or not
big enough to contain all the elements of this
collection, an new array is allocated,
and a is not changed.
public void trimToSize()
IntCollection
trimToSize
in interface IntCollection
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |