public static class AbstractDoubleList.DoubleSubList extends AbstractDoubleList implements Serializable
AbstractDoubleList.DoubleSubList| Constructor and Description |
|---|
AbstractDoubleList.DoubleSubList(DoubleList l,
int from,
int to) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(double k) |
void |
add(int index,
double k) |
boolean |
addAll(int index,
Collection<? extends Double> c) |
boolean |
addAll(int index,
DoubleCollection c)
Delegates to a more generic method.
|
boolean |
addAll(int index,
DoubleList l)
Delegates to a more generic method.
|
void |
addElements(int index,
double[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one.
|
void |
clear() |
double |
getDouble(int index) |
void |
getElements(int from,
double[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one.
|
DoubleListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(double k)
|
boolean |
remove(Object o)
Delegates to
rem(). |
double |
removeDouble(int index) |
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one.
|
double |
set(int index,
double k) |
int |
size() |
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. |
add, addAll, addAll, addAll, addElements, compareTo, contains, doubleListIterator, doubleListIterator, doubleSubList, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekDouble, pop, popDouble, push, push, remove, set, size, top, topDouble, toStringadd, contains, containsAll, containsAll, doubleIterator, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toDoubleArray, toDoubleArrayadd, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArraycontainsAll, doubleIterator, removeAll, retainAll, toArray, toArray, toDoubleArray, toDoubleArraypublic AbstractDoubleList.DoubleSubList(DoubleList l, int from, int to)
public boolean add(double k)
add in interface DoubleCollectionadd in interface DoubleListadd in class AbstractDoubleListCollection.add(Object)public void add(int index,
double k)
add in interface DoubleListadd in class AbstractDoubleListList.add(int,Object)public boolean addAll(int index,
Collection<? extends Double> c)
addAll in interface List<Double>addAll in class AbstractDoubleListpublic double getDouble(int index)
getDouble in interface DoubleListList.get(int)public double removeDouble(int index)
removeDouble in interface DoubleListremoveDouble in class AbstractDoubleListList.remove(int)public double set(int index,
double k)
set in interface DoubleListset in class AbstractDoubleListList.set(int,Object)public void clear()
clear in interface Collection<Double>clear in interface List<Double>clear in class AbstractCollection<Double>public int size()
size in interface Collection<Double>size in interface List<Double>size in class AbstractCollection<Double>public void getElements(int from,
double[] a,
int offset,
int length)
AbstractDoubleListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface DoubleListgetElements in class AbstractDoubleListfrom - 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)
AbstractDoubleListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface DoubleListremoveElements in class AbstractDoubleListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
double[] a,
int offset,
int length)
AbstractDoubleListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface DoubleListaddElements in class AbstractDoubleListindex - 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 DoubleListIterator listIterator(int index)
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 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 remove(Object o)
AbstractDoubleListrem().remove in interface Collection<Double>remove in interface List<Double>remove in class AbstractDoubleListpublic boolean addAll(int index,
DoubleCollection c)
AbstractDoubleListaddAll in interface DoubleListaddAll in class AbstractDoubleListList.add(int,Object)public boolean addAll(int index,
DoubleList l)
AbstractDoubleListaddAll in interface DoubleListaddAll in class AbstractDoubleListList.add(int,Object)