|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
it.unimi.dsi.fastutil.doubles.AbstractDoubleList
it.unimi.dsi.fastutil.doubles.AbstractDoubleList.DoubleSubList
Nested Class Summary |
Nested classes inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleList |
AbstractDoubleList.DoubleSubList |
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 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()
|
DoubleListIterator |
doubleListIterator(int index)
Returns a type-specific list iterator on the list starting at a given index. |
DoubleList |
doubleSubList(int from,
int to)
|
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. |
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. |
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()
|
Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleList |
add, addAll, addAll, addAll, addElements, compareTo, contains, doubleIterator, doubleListIterator, equals, get, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekDouble, pop, popDouble, push, push, remove, set, size, subList, top, topDouble, toString |
Methods inherited from class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, 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, iterator, remove, removeAll, retainAll, toArray, toArray |
Methods inherited from interface it.unimi.dsi.fastutil.doubles.DoubleCollection |
containsAll, removeAll, retainAll, toArray, toDoubleArray, toDoubleArray |
Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
Constructor Detail |
public AbstractDoubleList.DoubleSubList(DoubleList l, int from, int to)
Method Detail |
public boolean add(double k)
add
in interface DoubleCollection
add
in class AbstractDoubleList
public void add(int index, double k)
add
in interface DoubleList
add
in class AbstractDoubleList
public boolean addAll(int index, Collection c)
addAll
in interface List
addAll
in class AbstractDoubleList
public boolean addAll(int index, DoubleCollection c)
AbstractDoubleList
addAll
in interface DoubleList
addAll
in class AbstractDoubleList
public boolean addAll(int index, DoubleList l)
AbstractDoubleList
addAll
in interface DoubleList
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
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
public double set(int index, double k)
set
in interface DoubleList
set
in class AbstractDoubleList
public void clear()
clear
in interface List
clear
in class AbstractDoubleCollection
public int size()
size
in interface List
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 doubleListIterator(int index)
DoubleList
The iterator returned by the List.listIterator()
method and by this
method are identical; however, using this method you can save a type casting.
doubleListIterator
in interface DoubleList
doubleListIterator
in class AbstractDoubleList
public DoubleList doubleSubList(int from, int to)
doubleSubList
in interface DoubleList
doubleSubList
in class AbstractDoubleList
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |