public static class AbstractFloatList.FloatSubList extends AbstractFloatList implements java.io.Serializable
AbstractFloatList.FloatSubList
Constructor and Description |
---|
FloatSubList(FloatList l,
int from,
int to) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(float k) |
void |
add(int index,
float k) |
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Float> c) |
boolean |
addAll(int index,
FloatCollection c)
Delegates to a more generic method.
|
boolean |
addAll(int index,
FloatList l)
Delegates to a more generic method.
|
void |
addElements(int index,
float[] a,
int offset,
int length)
Adds elements to this type-specific list one-by-one.
|
void |
clear() |
void |
getElements(int from,
float[] a,
int offset,
int length)
Copies element of this type-specific list into the given array one-by-one.
|
float |
getFloat(int index) |
FloatListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given index.
|
boolean |
rem(float 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(java.lang.Object o)
Delegates to
rem() . |
void |
removeElements(int from,
int to)
Removes elements of this type-specific list one-by-one.
|
float |
removeFloat(int index) |
float |
set(int index,
float k) |
int |
size() |
FloatList |
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, equals, floatListIterator, floatListIterator, floatSubList, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekFloat, pop, popFloat, push, push, remove, set, size, top, topFloat, toString
add, contains, containsAll, containsAll, floatIterator, isEmpty, rem, removeAll, removeAll, retainAll, retainAll, toArray, toArray, toArray, toFloatArray, toFloatArray
add, contains, containsAll, isEmpty, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
containsAll, floatIterator, removeAll, retainAll, toArray, toArray, toFloatArray, toFloatArray
public FloatSubList(FloatList l, int from, int to)
public boolean add(float k)
add
in interface FloatCollection
add
in interface FloatList
add
in class AbstractFloatList
Collection.add(Object)
public void add(int index, float k)
add
in interface FloatList
add
in class AbstractFloatList
List.add(int,Object)
public boolean addAll(int index, java.util.Collection<? extends java.lang.Float> c)
addAll
in interface java.util.List<java.lang.Float>
addAll
in class AbstractFloatList
public float getFloat(int index)
public float removeFloat(int index)
removeFloat
in interface FloatList
removeFloat
in class AbstractFloatList
List.remove(int)
public float set(int index, float k)
set
in interface FloatList
set
in class AbstractFloatList
List.set(int,Object)
public void clear()
clear
in interface java.util.Collection<java.lang.Float>
clear
in interface java.util.List<java.lang.Float>
clear
in class java.util.AbstractCollection<java.lang.Float>
public int size()
size
in interface java.util.Collection<java.lang.Float>
size
in interface java.util.List<java.lang.Float>
size
in class java.util.AbstractCollection<java.lang.Float>
public void getElements(int from, float[] a, int offset, int length)
AbstractFloatList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements
in interface FloatList
getElements
in class AbstractFloatList
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)
AbstractFloatList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements
in interface FloatList
removeElements
in class AbstractFloatList
from
- the start index (inclusive).to
- the end index (exclusive).public void addElements(int index, float[] a, int offset, int length)
AbstractFloatList
This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements
in interface FloatList
addElements
in class AbstractFloatList
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 FloatListIterator listIterator(int index)
FloatList
listIterator
in interface FloatList
listIterator
in interface java.util.List<java.lang.Float>
listIterator
in class AbstractFloatList
List.listIterator(int)
public FloatList subList(int from, int to)
FloatList
from
, inclusive, to the index to
, exclusive.
Note that this specification strengthens the one given in List.subList(int,int)
.
subList
in interface FloatList
subList
in interface java.util.List<java.lang.Float>
subList
in class AbstractFloatList
List.subList(int,int)
public boolean rem(float k)
FloatCollection
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 FloatCollection
rem
in class AbstractFloatList
Collection.remove(Object)
public boolean remove(java.lang.Object o)
AbstractFloatList
rem()
.remove
in interface java.util.Collection<java.lang.Float>
remove
in interface java.util.List<java.lang.Float>
remove
in class AbstractFloatList
public boolean addAll(int index, FloatCollection c)
AbstractFloatList
addAll
in interface FloatList
addAll
in class AbstractFloatList
List.add(int,Object)
public boolean addAll(int index, FloatList l)
AbstractFloatList
addAll
in interface FloatList
addAll
in class AbstractFloatList
List.add(int,Object)