|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.AbstractCollection<Double>
it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
it.unimi.dsi.fastutil.doubles.AbstractDoubleList
it.unimi.dsi.fastutil.doubles.AbstractDoubleList.DoubleSubList
public static class AbstractDoubleList.DoubleSubList
Nested Class Summary |
---|
Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleList |
---|
AbstractDoubleList.DoubleSubList |
Field Summary | |
---|---|
static long |
serialVersionUID
|
Constructor Summary | |
---|---|
AbstractDoubleList.DoubleSubList(DoubleList l,
int from,
int to)
|
Method Summary | |
---|---|
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)
Note that this method should be called remove() , but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. |
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. |
Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleList |
---|
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, toString |
Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection |
---|
add, contains, containsAll, containsAll, doubleIterator, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toDoubleArray, toDoubleArray |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
---|
add, contains, containsAll, isEmpty, removeAll, retainAll, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection |
---|
containsAll, doubleIterator, removeAll, retainAll, toArray, toArray, toDoubleArray, toDoubleArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
---|
isEmpty |
Field Detail |
---|
public static final long serialVersionUID
Constructor Detail |
---|
public AbstractDoubleList.DoubleSubList(DoubleList l, int from, int to)
Method Detail |
---|
public boolean add(double k)
add
in interface DoubleCollection
add
in interface DoubleList
add
in class AbstractDoubleList
Collection.add(Object)
public void add(int index, double k)
add
in interface DoubleList
add
in class AbstractDoubleList
List.add(int,Object)
public boolean addAll(int index, Collection<? extends Double> c)
addAll
in interface List<Double>
addAll
in class AbstractDoubleList
public double getDouble(int index)
getDouble
in interface DoubleList
List.get(int)
public double removeDouble(int index)
removeDouble
in interface DoubleList
removeDouble
in class AbstractDoubleList
List.remove(int)
public double set(int index, double k)
set
in interface DoubleList
set
in class AbstractDoubleList
List.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)
AbstractDoubleList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface DoubleList
getElements
in class AbstractDoubleList
from
- 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)
AbstractDoubleList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface DoubleList
removeElements
in class AbstractDoubleList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, double[] a, int offset, int length)
AbstractDoubleList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface DoubleList
addElements
in class AbstractDoubleList
index
- 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)
DoubleList
listIterator
in interface DoubleList
listIterator
in interface List<Double>
listIterator
in class AbstractDoubleList
List.listIterator(int)
public DoubleList subList(int from, int to)
DoubleList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in List.subList(int,int)
.
subList
in interface DoubleList
subList
in interface List<Double>
subList
in class AbstractDoubleList
List.subList(int,int)
public boolean rem(double k)
DoubleCollection
remove()
, 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 DoubleCollection
rem
in class AbstractDoubleList
Collection.remove(Object)
public boolean remove(Object o)
AbstractDoubleList
rem()
.
remove
in interface Collection<Double>
remove
in interface List<Double>
remove
in class AbstractDoubleList
public boolean addAll(int index, DoubleCollection c)
AbstractDoubleList
addAll
in interface DoubleList
addAll
in class AbstractDoubleList
List.add(int,Object)
public boolean addAll(int index, DoubleList l)
AbstractDoubleList
addAll
in interface DoubleList
addAll
in class AbstractDoubleList
List.add(int,Object)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |