|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A type-specific Collection
; provides some additional methods
that use polymorphism to reduce type juggling.
Note that iterators provided by classes implementing this interface must be type specific.
Collection
Method Summary | |
boolean |
add(double key)
|
boolean |
addAll(DoubleCollection c)
|
boolean |
contains(double key)
|
boolean |
containsAll(DoubleCollection c)
|
DoubleIterator |
doubleIterator()
Returns a type-specific iterator on the collection. |
boolean |
remove(double key)
|
boolean |
removeAll(DoubleCollection c)
|
boolean |
retainAll(DoubleCollection c)
|
double[] |
toArray(double[] a)
Builds a primitive type array containing the items of this collection. |
double[] |
toDoubleArray()
Returns a primitive type array containing the items of this collection. |
double[] |
toDoubleArray(double[] a)
Builds a primitive type array containing the items of this collection. |
Methods inherited from interface java.util.Collection |
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
Method Detail |
public DoubleIterator doubleIterator()
The iterator returned by the Collection.iterator()
method and by this
method are identical; however, using this method you can save a type casting.
Collection.iterator()
public boolean contains(double key)
Collection.contains(Object)
public double[] toDoubleArray()
Collection.toArray()
public double[] toDoubleArray(double[] a)
a
- if this array is big enough, it will be used to store the collection.
Collection.toArray(Object[])
public double[] toArray(double[] a)
a
- if this array is big enough, it will be used to store the collection.
Collection.toArray(Object[])
public boolean add(double key)
Collection.add(Object)
public boolean remove(double key)
Collection.remove(Object)
public boolean addAll(DoubleCollection c)
Collection.addAll(Collection)
public boolean containsAll(DoubleCollection c)
Collection.containsAll(Collection)
public boolean removeAll(DoubleCollection c)
Collection.removeAll(Collection)
public boolean retainAll(DoubleCollection c)
Collection.retainAll(Collection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |