public static class AbstractDoubleBigList.DoubleSubList extends AbstractDoubleBigList implements java.io.Serializable
AbstractDoubleBigList.DoubleRandomAccessSubList, AbstractDoubleBigList.DoubleSubList
Constructor and Description |
---|
DoubleSubList(DoubleBigList l,
long from,
long to) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(double k)
Ensures that this collection contains the specified element (optional operation).
|
void |
add(long index,
double k)
Inserts the specified element at the specified position in this type-specific big list (optional operation).
|
boolean |
addAll(long index,
java.util.Collection<? extends java.lang.Double> c)
Adds all of the elements in the specified collection to this list (optional operation).
|
boolean |
addAll(long index,
DoubleBigList l)
Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
|
boolean |
addAll(long index,
DoubleCollection c)
Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
|
void |
addElements(long index,
double[][] a,
long offset,
long length)
Add (hopefully quickly) elements to this type-specific big list.
|
double |
getDouble(long index)
Returns the element at the specified position.
|
void |
getElements(long from,
double[][] a,
long offset,
long length)
Copies (hopefully quickly) elements of this type-specific big list into the given big array.
|
DoubleBigListIterator |
listIterator(long index)
Returns a type-specific list iterator on this type-specific big list starting at a given index.
|
boolean |
rem(double k)
Removes a single instance of the specified element from this collection, if it is present (optional operation).
|
double |
removeDouble(long index)
Removes the element at the specified position.
|
void |
removeElements(long from,
long to)
Removes (hopefully quickly) elements of this type-specific big list.
|
double |
set(long index,
double k)
Replaces the element at the specified position in this big list with the specified element (optional operation).
|
long |
size64()
Returns the size of this data structure as a long.
|
DoubleSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this big-list.
|
DoubleBigList |
subList(long from,
long to)
Returns a type-specific view of the portion of this type-specific big list from the index
from , inclusive, to the index to , exclusive. |
add, addAll, addAll, addElements, clear, compareTo, contains, equals, forEach, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekDouble, pop, popDouble, push, push, remove, set, setElements, size, size, top, topDouble, toString
add, contains, containsAll, containsAll, forEach, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toDoubleArray, toDoubleArray
addAll, addAll, addAll, setElements, setElements
add, contains, containsAll, doubleIterator, doubleParallelStream, doubleSpliterator, doubleStream, parallelStream, remove, removeAll, removeIf, removeIf, removeIf, retainAll, stream, toArray, toDoubleArray, toDoubleArray
containsAll, isEmpty, removeAll, retainAll, toArray, toArray
forEach, forEach
public DoubleSubList(DoubleBigList l, long from, long to)
public boolean add(double k)
AbstractDoubleBigList
add
in interface DoubleCollection
add
in class AbstractDoubleBigList
Collection.add(Object)
public void add(long index, double k)
AbstractDoubleBigList
add
in interface DoubleBigList
add
in class AbstractDoubleBigList
BigList.add(long,Object)
public boolean addAll(long index, java.util.Collection<? extends java.lang.Double> c)
AbstractDoubleBigList
addAll
in interface BigList<java.lang.Double>
addAll
in class AbstractDoubleBigList
index
- index at which to insert the first element from the specified collection.c
- collection containing elements to be added to this big list.true
if this big list changed as a result of the callList.addAll(int, Collection)
public double getDouble(long index)
DoubleBigList
getDouble
in interface DoubleBigList
BigList.get(long)
public double removeDouble(long index)
AbstractDoubleBigList
removeDouble
in interface DoubleBigList
removeDouble
in class AbstractDoubleBigList
BigList.remove(long)
public double set(long index, double k)
AbstractDoubleBigList
set
in interface DoubleBigList
set
in class AbstractDoubleBigList
BigList.set(long,Object)
public long size64()
Size64
public void getElements(long from, double[][] a, long offset, long length)
AbstractDoubleBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface DoubleBigList
getElements
in class AbstractDoubleBigList
from
- the start index (inclusive).a
- the destination big array.offset
- the offset into the destination big array where to store the first element copied.length
- the number of elements to be copied.public void removeElements(long from, long to)
AbstractDoubleBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface DoubleBigList
removeElements
in class AbstractDoubleBigList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(long index, double[][] a, long offset, long length)
AbstractDoubleBigList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface DoubleBigList
addElements
in class AbstractDoubleBigList
index
- the index at which to add elements.a
- the big array containing the elements.offset
- the offset of the first element to add.length
- the number of elements to add.public DoubleBigListIterator listIterator(long index)
AbstractDoubleBigList
listIterator
in interface BigList<java.lang.Double>
listIterator
in interface DoubleBigList
listIterator
in class AbstractDoubleBigList
index
- index of first element to be returned from the big-list iterator.BigList.listIterator(long)
public DoubleSpliterator spliterator()
DoubleBigList
BigList spliterators must report at least Spliterator.SIZED
and Spliterator.ORDERED
.
See List.spliterator()
for more documentation on the requirements
of the returned spliterator (despite BigList
not being a List
, most of the
same requirements apply.
spliterator
in interface DoubleBigList
spliterator
in interface DoubleCollection
spliterator
in interface DoubleIterable
spliterator
in interface java.lang.Iterable<java.lang.Double>
spliterator
in interface java.util.Collection<java.lang.Double>
public DoubleBigList subList(long from, long to)
DoubleBigList
from
, inclusive, to the index to
, exclusive.subList
in interface BigList<java.lang.Double>
subList
in interface DoubleBigList
subList
in class AbstractDoubleBigList
from
- the starting element (inclusive).to
- the ending element (exclusive).BigList.subList(long,long)
public boolean rem(double k)
AbstractDoubleBigList
rem
in interface DoubleCollection
rem
in class AbstractDoubleBigList
Collection.remove(Object)
public boolean addAll(long index, DoubleCollection c)
AbstractDoubleBigList
addAll
in interface DoubleBigList
addAll
in class AbstractDoubleBigList
List.addAll(int,java.util.Collection)
public boolean addAll(long index, DoubleBigList l)
DoubleBigList
addAll
in interface DoubleBigList
BigList.addAll(long,Collection)