public static class FloatLists.Singleton extends AbstractFloatList implements RandomAccess, Serializable, Cloneable
This class may be useful to implement your own in case you subclass a type-specific list.
AbstractFloatList.FloatSubList| Modifier and Type | Method and Description |
|---|---|
boolean |
addAll(Collection<? extends Float> c)
This implementation delegates to the type-specific version of
List.addAll(int, Collection). |
boolean |
addAll(FloatCollection c)
Adds all elements of the given type-specific collection to this
collection.
|
boolean |
addAll(FloatList c)
Appends all of the elements in the specified type-specific list to the
end of this type-specific list (optional operation).
|
boolean |
addAll(int i,
Collection<? extends Float> c)
Adds all of the elements in the specified collection to this list
(optional operation).
|
boolean |
addAll(int i,
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 i,
FloatList c)
Inserts all of the elements in the specified type-specific list into this
type-specific list at the specified position (optional operation).
|
void |
clear()
This implementation delegates to
AbstractFloatList.removeElements(int, int). |
Object |
clone() |
boolean |
contains(float k)
Returns true if this list contains the specified element.
|
float |
getFloat(int i)
Returns the element at the specified position in this list.
|
FloatListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
FloatListIterator |
listIterator()
Returns a type-specific list iterator on the list.
|
FloatListIterator |
listIterator(int i)
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).
|
boolean |
removeAll(Collection<?> c) |
boolean |
removeAll(FloatCollection c)
Remove from this collection all elements in the given type-specific
collection.
|
float |
removeFloat(int i)
Removes the element at the specified position in this list (optional
operation).
|
boolean |
retainAll(Collection<?> c) |
boolean |
retainAll(FloatCollection c)
Retains in this collection only elements from the given type-specific
collection.
|
int |
size() |
void |
size(int size)
Sets the size of this list.
|
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. |
float[] |
toFloatArray()
Returns a primitive type array containing the items of this collection.
|
add, add, add, addElements, addElements, compareTo, equals, floatListIterator, floatListIterator, floatSubList, get, getElements, hashCode, indexOf, indexOf, lastIndexOf, lastIndexOf, peek, peekFloat, pop, popFloat, push, push, remove, removeElements, set, set, top, topFloat, toStringadd, contains, containsAll, floatIterator, remove, toArray, toFloatArraycontainsAll, isEmpty, toArray, toArraycontains, containsAll, isEmpty, remove, replaceAll, sort, spliterator, toArray, toArraycontains, containsAll, floatIterator, remove, toArray, toFloatArrayparallelStream, removeIf, streampublic float getFloat(int i)
FloatListgetFloat in interface FloatListList.get(int)public boolean rem(float k)
AbstractFloatList
This implementation delegates to indexOf().
rem in interface FloatCollectionrem in class AbstractFloatListList.remove(Object)public float removeFloat(int i)
AbstractFloatList
This implementation always throws an
UnsupportedOperationException.
removeFloat in interface FloatListremoveFloat in class AbstractFloatListList.remove(int)public boolean contains(float k)
AbstractFloatList
This implementation delegates to indexOf().
contains in interface FloatCollectioncontains in class AbstractFloatListList.contains(Object)public float[] toFloatArray()
FloatCollectiontoFloatArray in interface FloatCollectiontoFloatArray in class AbstractFloatCollectionCollection.toArray()public FloatListIterator listIterator()
AbstractFloatList
This implementation delegates to listIterator(0).
listIterator in interface FloatListlistIterator in interface List<Float>listIterator in class AbstractFloatListList.listIterator()public FloatListIterator iterator()
AbstractFloatList
Note that this specification strengthens the one given in
Iterable.iterator(), which was already strengthened in
the corresponding type-specific class, but was weakened by the fact that
this interface extends Collection.
This implementation delegates to AbstractFloatList.listIterator().
iterator in interface FloatCollectioniterator in interface FloatIterableiterator in interface FloatListiterator in interface Iterable<Float>iterator in interface Collection<Float>iterator in interface List<Float>iterator in class AbstractFloatListIterable.iterator()public FloatListIterator listIterator(int i)
AbstractFloatListThis implementation is based on the random-access methods.
listIterator in interface FloatListlistIterator in interface List<Float>listIterator in class AbstractFloatListList.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 AbstractFloatListList.subList(int,int)public boolean addAll(int i,
Collection<? extends Float> c)
AbstractFloatListaddAll in interface List<Float>addAll in class AbstractFloatListpublic boolean addAll(Collection<? extends Float> c)
AbstractFloatList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface Collection<Float>addAll in interface List<Float>addAll in class AbstractFloatListpublic boolean removeAll(Collection<?> c)
removeAll in interface Collection<Float>removeAll in interface List<Float>removeAll in class AbstractCollection<Float>public boolean retainAll(Collection<?> c)
retainAll in interface Collection<Float>retainAll in interface List<Float>retainAll in class AbstractCollection<Float>public boolean addAll(FloatList c)
AbstractFloatList
This implementation delegates to the type-specific list version of
List.addAll(int, Collection).
addAll in interface FloatListaddAll in class AbstractFloatListList.add(int,Object)public boolean addAll(int i,
FloatList c)
AbstractFloatList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface FloatListaddAll in class AbstractFloatListList.add(int,Object)public boolean addAll(int i,
FloatCollection c)
FloatListaddAll in interface FloatListaddAll in class AbstractFloatListList.addAll(int,Collection)public boolean addAll(FloatCollection c)
AbstractFloatList
This implementation delegates to the type-specific version of
List.addAll(int, Collection).
addAll in interface FloatCollectionaddAll in class AbstractFloatListc - a type-specific collection.true if this collection changed as a result of the
call.Collection.addAll(Collection)public boolean removeAll(FloatCollection c)
FloatCollectionremoveAll in interface FloatCollectionremoveAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection changed as a result of the
call.Collection.removeAll(Collection)public boolean retainAll(FloatCollection c)
FloatCollectionretainAll in interface FloatCollectionretainAll in class AbstractFloatCollectionc - a type-specific collection.true if this collection changed as a result of the
call.Collection.retainAll(Collection)public int size()
size in interface Collection<Float>size in interface List<Float>size in class AbstractCollection<Float>public void size(int size)
FloatList
If the specified size is smaller than the current size, the last elements
are discarded. Otherwise, they are filled with
0/null/false.
size in interface FloatListsize in class AbstractFloatListsize - the new size.public void clear()
AbstractFloatList
This implementation delegates to AbstractFloatList.removeElements(int, int).
clear in interface Collection<Float>clear in interface List<Float>clear in class AbstractFloatList