|
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.UnmodifiableLongCollection
This class represents unmodifiable collections of long values.
Collections.unmodifiableCollection(java.util.Collection)
Field Summary | |
protected LongCollection |
collection
The collection underlying this unmodifiable collection. |
Constructor Summary | |
UnmodifiableLongCollection(LongCollection c)
Creates a new unmodifiable collection on an existing collection. |
Method Summary | |
boolean |
add(long v)
Throws UnsupportedOperationException. |
boolean |
addAll(LongCollection c)
Throws UnsupportedOperationException. |
void |
clear()
Throws UnsupportedOperationException. |
boolean |
contains(long v)
Indicates whether this collection contains a specified element. |
boolean |
containsAll(LongCollection 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. |
LongIterator |
iterator()
Returns an iterator over this collection. |
boolean |
remove(long v)
Throws UnsupportedOperationException. |
boolean |
removeAll(LongCollection c)
Throws UnsupportedOperationException. |
boolean |
retainAll(LongCollection c)
Throws UnsupportedOperationException. |
int |
size()
Returns the number of elements in this collection. |
long[] |
toArray()
Returns the elements of this collection as an array. |
long[] |
toArray(long[] 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 LongCollection collection
Constructor Detail |
public UnmodifiableLongCollection(LongCollection c)
c
- the existing collection to make unmodifiable.
NullPointerException
- if c is null.Method Detail |
public boolean add(long v)
add
in interface LongCollection
v
- the element to add to this collection.
UnsupportedOperationException
- unconditionally.LongCollection.addAll(LongCollection)
public boolean addAll(LongCollection c)
addAll
in interface LongCollection
c
- the collection whose elements to add to this
collection.
UnsupportedOperationException
- unconditionally.LongCollection.add(long)
public void clear()
clear
in interface LongCollection
UnsupportedOperationException
- unconditionally.public boolean contains(long v)
LongCollection
contains
in interface LongCollection
v
- the element to test for containment.
LongCollection.containsAll(LongCollection)
public boolean containsAll(LongCollection c)
LongCollection
containsAll
in interface LongCollection
c
- the collection whose elements to test for
containment.
LongCollection.contains(long)
public boolean equals(Object obj)
LongCollection
equals
in interface LongCollection
public int hashCode()
LongCollection
hashCode
in interface LongCollection
public boolean isEmpty()
LongCollection
isEmpty
in interface LongCollection
public LongIterator iterator()
LongCollection
iterator
in interface LongCollection
public boolean remove(long v)
remove
in interface LongCollection
v
- the long value to remove from this collection.
UnsupportedOperationException
- unconditionally.public boolean removeAll(LongCollection c)
removeAll
in interface LongCollection
c
- the collection whose elements to remove from this
collection.
UnsupportedOperationException
- unconditionally.public boolean retainAll(LongCollection c)
retainAll
in interface LongCollection
c
- the collection whose elements to retain in this
collection.
UnsupportedOperationException
- unconditionally.public int size()
LongCollection
size
in interface LongCollection
public long[] toArray()
LongCollection
toArray
in interface LongCollection
public long[] toArray(long[] a)
LongCollection
toArray
in interface LongCollection
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()
LongCollection
trimToSize
in interface LongCollection
|
PCJ API Version 1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |