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