public static class DoubleLists.Singleton extends AbstractDoubleList implements Serializable, Cloneable
This class may be useful to implement your own in case you subclass a type-specific list.
AbstractDoubleList.DoubleSubList| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(Collection<? extends Double> c)
Delegates to a more generic method.
|
boolean |
addAll(DoubleCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(int i,
Collection<? extends Double> c) |
boolean |
addAll(int i,
DoubleCollection c)
Delegates to a more generic method.
|
void |
clear() |
Object |
clone() |
boolean |
contains(double k) |
double |
getDouble(int i) |
DoubleListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
DoubleListIterator |
listIterator()
Returns a type-specific list iterator on the list.
|
DoubleListIterator |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(double k)
|
boolean |
removeAll(Collection<?> c)
Remove from this collection all elements in the given collection.
|
double |
removeDouble(int i) |
boolean |
retainAll(Collection<?> c)
Retains in this collection only elements from the given collection.
|
int |
size() |
void |
size(int size)
Sets the size of this list.
|
DoubleList |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index
from, inclusive, to the index to, exclusive. |
double[] |
toDoubleArray()
Returns a primitive type array containing the items of this collection.
|
add, add, add, addAll, addAll, addElements, addElements, compareTo, doubleListIterator, doubleListIterator, doubleSubList, equals, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, peek, peekDouble, pop, popDouble, push, push, remove, remove, removeElements, set, set, top, topDouble, toStringadd, contains, containsAll, containsAll, doubleIterator, isEmpty, rem, removeAll, retainAll, toArray, toArray, toArray, toDoubleArrayadd, contains, containsAll, isEmpty, toArray, toArraycontainsAll, doubleIterator, removeAll, retainAll, toArray, toArray, toDoubleArraypublic double getDouble(int i)
getDouble in interface DoubleListList.get(int)public double removeDouble(int i)
removeDouble in interface DoubleListremoveDouble in class AbstractDoubleListList.remove(int)public boolean contains(double k)
contains in interface DoubleCollectioncontains in class AbstractDoubleListCollection.contains(Object)public boolean addAll(Collection<? extends Double> c)
AbstractDoubleListaddAll in interface Collection<Double>addAll in interface List<Double>addAll in class AbstractDoubleListc - a collection.true if this collection changed as a result of the call.public boolean addAll(int i,
Collection<? extends Double> c)
addAll in interface List<Double>addAll in class AbstractDoubleListpublic boolean removeAll(Collection<?> c)
AbstractDoubleCollectionremoveAll in interface Collection<Double>removeAll in interface List<Double>removeAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public boolean retainAll(Collection<?> c)
AbstractDoubleCollectionretainAll in interface Collection<Double>retainAll in interface List<Double>retainAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public double[] toDoubleArray()
DoubleCollectiontoDoubleArray in interface DoubleCollectiontoDoubleArray in class AbstractDoubleCollectionCollection.toArray()public DoubleListIterator listIterator()
DoubleListlistIterator in interface DoubleListlistIterator in interface List<Double>listIterator in class AbstractDoubleListList.listIterator()public DoubleListIterator iterator()
DoubleCollectionNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
iterator in interface DoubleCollectioniterator in interface DoubleIterableiterator in interface DoubleListiterator in interface Iterable<Double>iterator in interface Collection<Double>iterator in interface List<Double>iterator in class AbstractDoubleListpublic DoubleListIterator listIterator(int i)
DoubleListlistIterator in interface DoubleListlistIterator in interface List<Double>listIterator in class AbstractDoubleListList.listIterator(int)public DoubleList subList(int from, int to)
DoubleListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface DoubleListsubList in interface List<Double>subList in class AbstractDoubleListList.subList(int,int)public int size()
size in interface Collection<Double>size in interface List<Double>size in class AbstractCollection<Double>public void size(int size)
DoubleListIf the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null/false.
size in interface DoubleListsize in class AbstractDoubleListsize - the new size.public void clear()
clear in interface Collection<Double>clear in interface List<Double>clear in class AbstractCollection<Double>public boolean rem(double k)
DoubleCollectionremove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove().rem in interface DoubleCollectionrem in class AbstractDoubleListCollection.remove(Object)public boolean addAll(DoubleCollection c)
AbstractDoubleCollectionaddAll in interface DoubleCollectionaddAll in class AbstractDoubleListc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(int i,
DoubleCollection c)
AbstractDoubleListaddAll in interface DoubleListaddAll in class AbstractDoubleListList.add(int,Object)