public static class AbstractFloatList.FloatSubList extends AbstractFloatList implements Serializable
AbstractFloatList.FloatSubList| Constructor and Description |
|---|
FloatSubList(FloatList l,
int from,
int to) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(float k)
Ensures that this collection contains the specified element (optional
operation).
|
void |
add(int index,
float k)
Inserts the specified element at the specified position in this list
(optional operation).
|
boolean |
addAll(int index,
Collection<? extends Float> c)
Adds all of the elements in the specified collection to this list
(optional operation).
|
boolean |
addAll(int index,
FloatCollection c)
Inserts all of the elements in the specified type-specific collection
into this type-specific list at the specified position (optional
operation).
|
boolean |
addAll(int index,
FloatList l)
Inserts all of the elements in the specified type-specific list into this
type-specific list at the specified position (optional operation).
|
void |
addElements(int index,
float[] a,
int offset,
int length)
Add (hopefully quickly) elements to this type-specific list.
|
void |
getElements(int from,
float[] a,
int offset,
int length)
Copies (hopefully quickly) elements of this type-specific list into the
given array.
|
float |
getFloat(int index)
Returns the element at the specified position in this list.
|
FloatListIterator |
listIterator(int index)
Returns a type-specific list iterator on the list starting at a given
index.
|
boolean |
rem(float k)
Removes a single instance of the specified element from this collection,
if it is present (optional operation).
|
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list.
|
float |
removeFloat(int index)
Removes the element at the specified position in this list (optional
operation).
|
float |
set(int index,
float k)
Replaces the element at the specified position in this list with the
specified element (optional operation).
|
int |
size()
Returns the number of elements in this collection.
|
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, clear, compareTo, contains, equals, get, hashCode, indexOf, indexOf, iterator, lastIndexOf, lastIndexOf, listIterator, peek, peekFloat, pop, popFloat, push, push, remove, set, size, top, topFloat, toStringadd, contains, containsAll, remove, removeAll, retainAll, toArray, toFloatArray, toFloatArraycontainsAll, isEmpty, removeAll, retainAll, toArray, toArraycontains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArraycontains, containsAll, remove, removeAll, retainAll, toArray, toFloatArray, toFloatArrayparallelStream, removeIf, streamforEach, forEachpublic FloatSubList(FloatList l, int from, int to)
public boolean add(float k)
AbstractFloatList
This implementation always throws an
UnsupportedOperationException.
This implementation delegates to the type-specific version of
List.add(int, Object).
add in interface FloatCollectionadd in interface FloatListadd in class AbstractFloatListCollection.add(Object)public void add(int index,
float k)
AbstractFloatList
This implementation always throws an
UnsupportedOperationException.
add in interface FloatListadd in class AbstractFloatListList.add(int,Object)public boolean addAll(int index,
Collection<? extends Float> c)
AbstractFloatListaddAll in interface List<Float>addAll in class AbstractFloatListindex - index at which to insert the first element from the
specified collectionc - collection containing elements to be added to this listpublic float getFloat(int index)
FloatListgetFloat in interface FloatListList.get(int)public float removeFloat(int index)
AbstractFloatList
This implementation always throws an
UnsupportedOperationException.
removeFloat in interface FloatListremoveFloat in class AbstractFloatListList.remove(int)public float set(int index,
float k)
AbstractFloatList
This implementation always throws an
UnsupportedOperationException.
set in interface FloatListset in class AbstractFloatListList.set(int,Object)public int size()
java.util.Collectionsize in interface Collection<Float>size in interface List<Float>size in class AbstractCollection<Float>public void getElements(int from,
float[] a,
int offset,
int length)
AbstractFloatListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
getElements in interface FloatListgetElements in class AbstractFloatListfrom - 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)
AbstractFloatListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
removeElements in interface FloatListremoveElements in class AbstractFloatListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
float[] a,
int offset,
int length)
AbstractFloatListThis is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.
addElements in interface FloatListaddElements in class AbstractFloatListindex - 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)
AbstractFloatListThis implementation is based on the random-access methods.
listIterator in interface FloatListlistIterator in interface List<Float>listIterator in class AbstractFloatListindex - index of the first element to be returned from the
list iterator (by a call to next)List.listIterator(int)public FloatList subList(int from, int to)
FloatListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in
List.subList(int,int).
subList in interface FloatListsubList in interface List<Float>subList in class AbstractFloatListfrom - low endpoint (inclusive) of the subListto - high endpoint (exclusive) of the subListList.subList(int,int)public boolean rem(float k)
AbstractFloatList
This implementation delegates to indexOf().
rem in interface FloatCollectionrem in class AbstractFloatListList.remove(Object)public boolean addAll(int index,
FloatCollection c)
FloatListaddAll in interface FloatListaddAll in class AbstractFloatListList.addAll(int,java.util.Collection)public boolean addAll(int index,
FloatList l)
AbstractFloatList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface FloatListaddAll in class AbstractFloatListList.add(int,Object)