public static class FloatLists.EmptyList extends FloatCollections.EmptyCollection implements FloatList, java.io.Serializable, java.lang.Cloneable
This class may be useful to implement your own in case you subclass a type-specific list.
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(float k) |
boolean |
add(java.lang.Float k)
Delegates to the corresponding type-specific method.
|
void |
add(int index,
float k) |
void |
add(int index,
java.lang.Float k) |
boolean |
addAll(java.util.Collection<? extends java.lang.Float> c)
Adds all elements of the given collection to this collection.
|
boolean |
addAll(FloatCollection c)
Adds all elements of the given type-specific collection to this collection.
|
boolean |
addAll(FloatList c) |
boolean |
addAll(int i,
java.util.Collection<? extends java.lang.Float> c) |
boolean |
addAll(int i,
FloatCollection c) |
boolean |
addAll(int i,
FloatList c) |
void |
addElements(int index,
float[] a)
Add (hopefully quickly) elements to this type-specific list.
|
void |
addElements(int index,
float[] a,
int offset,
int length)
Add (hopefully quickly) elements to this type-specific list.
|
java.lang.Object |
clone() |
int |
compareTo(java.util.List<? extends java.lang.Float> o) |
boolean |
equals(java.lang.Object o) |
FloatIterator |
floatIterator()
Deprecated.
|
FloatListIterator |
floatListIterator()
Deprecated.
|
FloatListIterator |
floatListIterator(int i)
Deprecated.
|
FloatList |
floatSubList(int from,
int to)
Deprecated.
|
java.lang.Float |
get(int i) |
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 i) |
int |
hashCode() |
int |
indexOf(float k) |
int |
indexOf(java.lang.Object k) |
FloatListIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
int |
lastIndexOf(float k) |
int |
lastIndexOf(java.lang.Object k) |
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.
|
java.lang.Float |
remove(int k) |
boolean |
removeAll(java.util.Collection<?> c)
Remove from this collection all elements in the given collection.
|
void |
removeElements(int from,
int to)
Removes (hopefully quickly) elements of this type-specific list.
|
float |
removeFloat(int i) |
float |
set(int index,
float k) |
java.lang.Float |
set(int index,
java.lang.Float k) |
void |
size(int s)
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. |
java.lang.String |
toString() |
clear, contains, containsAll, rem, removeAll, retainAll, size, toArray, toFloatArray, toFloatArraycontains, containsAll, isEmpty, rem, remove, retainAll, toArray, toArrayclear, contains, containsAll, isEmpty, remove, replaceAll, retainAll, size, sort, spliterator, toArray, toArraycontains, containsAll, rem, removeAll, retainAll, toArray, toArray, toFloatArray, toFloatArraypublic void add(int index,
float k)
public boolean add(float k)
add in interface FloatCollectionadd in interface FloatListadd in class FloatCollections.EmptyCollectionCollection.add(Object)public float removeFloat(int i)
removeFloat in interface FloatListList.remove(int)public float set(int index,
float k)
public int indexOf(float k)
public int lastIndexOf(float k)
lastIndexOf in interface FloatListList.lastIndexOf(Object)public boolean addAll(java.util.Collection<? extends java.lang.Float> c)
AbstractFloatCollectionaddAll in interface java.util.Collection<java.lang.Float>addAll in interface java.util.List<java.lang.Float>addAll in class AbstractFloatCollectionc - a collection.true if this collection changed as a result of the call.public boolean addAll(int i,
java.util.Collection<? extends java.lang.Float> c)
addAll in interface java.util.List<java.lang.Float>public boolean removeAll(java.util.Collection<?> c)
AbstractFloatCollectionremoveAll in interface java.util.Collection<java.lang.Float>removeAll in interface java.util.List<java.lang.Float>removeAll in class AbstractFloatCollectionc - a collection.true if this collection changed as a result of the call.public java.lang.Float get(int i)
get in interface java.util.List<java.lang.Float>public boolean addAll(FloatCollection c)
AbstractFloatCollectionaddAll in interface FloatCollectionaddAll in class FloatCollections.EmptyCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean addAll(FloatList c)
public boolean addAll(int i,
FloatCollection c)
public boolean addAll(int i,
FloatList c)
public void add(int index,
java.lang.Float k)
add in interface java.util.List<java.lang.Float>public boolean add(java.lang.Float k)
AbstractFloatCollectionadd in interface java.util.Collection<java.lang.Float>add in interface java.util.List<java.lang.Float>add in class AbstractFloatCollectionpublic java.lang.Float set(int index,
java.lang.Float k)
set in interface java.util.List<java.lang.Float>public float getFloat(int i)
public java.lang.Float remove(int k)
remove in interface java.util.List<java.lang.Float>public int indexOf(java.lang.Object k)
indexOf in interface java.util.List<java.lang.Float>public int lastIndexOf(java.lang.Object k)
lastIndexOf in interface java.util.List<java.lang.Float>@Deprecated public FloatIterator floatIterator()
AbstractFloatCollectionfloatIterator in interface FloatCollectionfloatIterator in class AbstractFloatCollectionFloatCollection.iterator()public FloatListIterator listIterator()
FloatListlistIterator in interface FloatListlistIterator in interface java.util.List<java.lang.Float>List.listIterator()public FloatListIterator iterator()
FloatCollectionNote 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.
iterator in interface FloatCollectioniterator in interface FloatIterableiterator in interface FloatListiterator in interface java.lang.Iterable<java.lang.Float>iterator in interface java.util.Collection<java.lang.Float>iterator in interface java.util.List<java.lang.Float>iterator in class FloatCollections.EmptyCollectionpublic FloatListIterator listIterator(int i)
FloatListlistIterator in interface FloatListlistIterator in interface java.util.List<java.lang.Float>List.listIterator(int)@Deprecated public FloatListIterator floatListIterator()
FloatListfloatListIterator in interface FloatListFloatList.listIterator()@Deprecated public FloatListIterator floatListIterator(int i)
FloatListfloatListIterator in interface FloatListFloatList.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).
@Deprecated public FloatList floatSubList(int from, int to)
FloatListfrom, inclusive, to the index to, exclusive.floatSubList in interface FloatListList.subList(int,int)public void getElements(int from,
float[] a,
int offset,
int length)
FloatListgetElements in interface FloatListfrom - 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)
FloatListremoveElements in interface FloatListfrom - the start index (inclusive).to - the end index (exclusive).public void addElements(int index,
float[] a,
int offset,
int length)
FloatListaddElements in interface FloatListindex - 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 void addElements(int index,
float[] a)
FloatListaddElements in interface FloatListindex - the index at which to add elements.a - the array containing the elements.public void size(int s)
FloatListIf the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null/false.
public int compareTo(java.util.List<? extends java.lang.Float> o)
compareTo in interface java.lang.Comparable<java.util.List<? extends java.lang.Float>>public java.lang.Object clone()
clone in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.Collection<java.lang.Float>hashCode in interface java.util.List<java.lang.Float>hashCode in class FloatCollections.EmptyCollectionpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Float>equals in interface java.util.List<java.lang.Float>equals in class FloatCollections.EmptyCollectionpublic java.lang.String toString()
toString in class AbstractFloatCollection