public static class DoubleLists.EmptyList extends DoubleCollections.EmptyCollection implements DoubleList, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific list.
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(double k) |
boolean |
add(java.lang.Double k)
Delegates to the corresponding type-specific method.
|
void |
add(int index,
double k) |
void |
add(int index,
java.lang.Double k) |
boolean |
addAll(java.util.Collection<? extends java.lang.Double> c)
Adds all elements of the given collection to this collection.
|
boolean |
addAll(DoubleCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(DoubleList c) |
boolean |
addAll(int i,
java.util.Collection<? extends java.lang.Double> c) |
boolean |
addAll(int i,
DoubleCollection c) |
boolean |
addAll(int i,
DoubleList c) |
void |
addElements(int index,
double[] a)
Add (hopefully quickly) elements to this type-specific list.
|
void |
addElements(int index,
double[] a,
int offset,
int length)
Add (hopefully quickly) elements to this type-specific list.
|
java.lang.Object |
clone() |
int |
compareTo(java.util.List<? extends java.lang.Double> o) |
DoubleIterator |
doubleIterator()
Deprecated.
|
DoubleListIterator |
doubleListIterator()
Deprecated.
|
DoubleListIterator |
doubleListIterator(int i)
Deprecated.
|
DoubleList |
doubleSubList(int from,
int to)
Deprecated.
|
boolean |
equals(java.lang.Object o) |
java.lang.Double |
get(int i) |
double |
getDouble(int i) |
void |
getElements(int from,
double[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the given array.
|
int |
hashCode() |
int |
indexOf(double k) |
int |
indexOf(java.lang.Object k) |
DoubleListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
int |
lastIndexOf(double k) |
int |
lastIndexOf(java.lang.Object k) |
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.
|
java.lang.Double |
remove(int k) |
boolean |
removeAll(java.util.Collection<?> c)
Remove from this collection all elements in the given collection.
|
double |
removeDouble(int i) |
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list.
|
double |
set(int index,
double k) |
java.lang.Double |
set(int index,
java.lang.Double k) |
void |
size(int s)
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. |
java.lang.String |
toString() |
clear, contains, containsAll, rem, removeAll, retainAll, size, toArray, toDoubleArray, toDoubleArraycontains, containsAll, isEmpty, rem, remove, retainAll, toArray, toArrayclear, contains, containsAll, isEmpty, remove, replaceAll, retainAll, size, sort, spliterator, toArray, toArraycontains, containsAll, rem, removeAll, retainAll, toArray, toArray, toDoubleArray, toDoubleArraypublic void add(int index,
double k)
add in interface DoubleListList.add(int,Object)public boolean add(double k)
add in interface DoubleCollectionadd in interface DoubleListadd in class DoubleCollections.EmptyCollectionCollection.add(Object)public double removeDouble(int i)
removeDouble in interface DoubleListList.remove(int)public double set(int index,
double k)
set in interface DoubleListList.set(int,Object)public int indexOf(double k)
indexOf in interface DoubleListList.indexOf(Object)public int lastIndexOf(double k)
lastIndexOf in interface DoubleListList.lastIndexOf(Object)public boolean addAll(java.util.Collection<? extends java.lang.Double> c)
AbstractDoubleCollectionaddAll in interface java.util.Collection<java.lang.Double>addAll in interface java.util.List<java.lang.Double>addAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public boolean addAll(int i,
java.util.Collection<? extends java.lang.Double> c)
addAll in interface java.util.List<java.lang.Double>public boolean removeAll(java.util.Collection<?> c)
AbstractDoubleCollectionremoveAll in interface java.util.Collection<java.lang.Double>removeAll in interface java.util.List<java.lang.Double>removeAll in class AbstractDoubleCollectionc - a collection.true if this collection changed as a result of the call.public java.lang.Double get(int i)
get in interface java.util.List<java.lang.Double>public boolean addAll(DoubleCollection c)
AbstractDoubleCollectionaddAll in interface DoubleCollectionaddAll in class DoubleCollections.EmptyCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(DoubleList c)
addAll in interface DoubleListList.add(int,Object)public boolean addAll(int i,
DoubleCollection c)
addAll in interface DoubleListList.add(int,Object)public boolean addAll(int i,
DoubleList c)
addAll in interface DoubleListList.add(int,Object)public void add(int index,
java.lang.Double k)
add in interface java.util.List<java.lang.Double>public boolean add(java.lang.Double k)
AbstractDoubleCollectionadd in interface java.util.Collection<java.lang.Double>add in interface java.util.List<java.lang.Double>add in class AbstractDoubleCollectionpublic java.lang.Double set(int index,
java.lang.Double k)
set in interface java.util.List<java.lang.Double>public double getDouble(int i)
getDouble in interface DoubleListList.get(int)public java.lang.Double remove(int k)
remove in interface java.util.List<java.lang.Double>public int indexOf(java.lang.Object k)
indexOf in interface java.util.List<java.lang.Double>public int lastIndexOf(java.lang.Object k)
lastIndexOf in interface java.util.List<java.lang.Double>@Deprecated public DoubleIterator doubleIterator()
AbstractDoubleCollectiondoubleIterator in interface DoubleCollectiondoubleIterator in class AbstractDoubleCollectionDoubleCollection.iterator()public DoubleListIterator listIterator()
DoubleListlistIterator in interface DoubleListlistIterator in interface java.util.List<java.lang.Double>List.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 java.lang.Iterable<java.lang.Double>iterator in interface java.util.Collection<java.lang.Double>iterator in interface java.util.List<java.lang.Double>iterator in class DoubleCollections.EmptyCollectionpublic DoubleListIterator listIterator(int i)
DoubleListlistIterator in interface DoubleListlistIterator in interface java.util.List<java.lang.Double>List.listIterator(int)@Deprecated public DoubleListIterator doubleListIterator()
DoubleListdoubleListIterator in interface DoubleListDoubleList.listIterator()@Deprecated public DoubleListIterator doubleListIterator(int i)
DoubleListdoubleListIterator in interface DoubleListDoubleList.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 java.util.List<java.lang.Double>List.subList(int,int)@Deprecated public DoubleList doubleSubList(int from, int to)
DoubleListfrom, inclusive, to the index to, exclusive.doubleSubList in interface DoubleListList.subList(int,int)public void getElements(int from,
double[] a,
int offset,
int length)
DoubleListgetElements in interface DoubleListfrom - the start index (inclusive).a - the destination array.offset - the offset into the destination array where to store the first element copied.length - the number of elements to be copied.public void removeElements(int from,
int to)
DoubleListremoveElements in interface DoubleListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
double[] a,
int offset,
int length)
DoubleListaddElements in interface DoubleListindex - the index at which to add elements.a - the array containing the elements.offset - the offset of the first element to add.length - the number of elements to add.public void addElements(int index,
double[] a)
DoubleListaddElements in interface DoubleListindex - the index at which to add elements.a - the array containing the elements.public void size(int s)
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 DoubleLists - the new size.public int compareTo(java.util.List<? extends java.lang.Double> o)
compareTo in interface java.lang.Comparable<java.util.List<? extends java.lang.Double>>public java.lang.Object clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<java.lang.Double>hashCode in interface java.util.List<java.lang.Double>hashCode in class DoubleCollections.EmptyCollectionpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Double>equals in interface java.util.List<java.lang.Double>equals in class DoubleCollections.EmptyCollectionpublic java.lang.String toString()
toString in class AbstractDoubleCollection