public class ImmutableFloatList extends AbstractFloatList
ISizeProvider.CollectionSize| Constructor and Description |
|---|
ImmutableFloatList(java.util.Collection<? extends java.lang.Float> c)
Deprecated.
|
ImmutableFloatList(float... a)
Creates a new Immutable copy of the contents of the Array.
|
ImmutableFloatList(float[] a,
int length)
Creates a new ImmutableList copy of the array with a custom length
|
ImmutableFloatList(float[] a,
int offset,
int length)
Creates a new ImmutableList copy of the array with in the custom range.
|
ImmutableFloatList(FloatCollection c)
Creates a new Immutable copy of the contents of the Collection.
|
ImmutableFloatList(FloatList l)
Creates a new Immutable copy of the contents of the List.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(float e)
A Type-Specific implementation of add function that delegates to
List.add(int, Object) |
void |
add(int index,
float e)
A Type-Specific add Function to reduce (un)boxing
|
boolean |
addAll(float[] e,
int offset,
int length)
A Type-Specific Array based addAll method to reduce the amount of Wrapping
|
boolean |
addAll(int index,
java.util.Collection<? extends java.lang.Float> c)
Deprecated.
|
boolean |
addAll(int index,
FloatCollection c)
A Type-Specific addAll Function to reduce (un)boxing
|
boolean |
addAll(int index,
FloatList c)
A Type-Specific and optimized addAll function that allows a faster transfer of elements
|
void |
addElements(int from,
float[] a,
int offset,
int length)
A function to fast add elements to the list
|
void |
clear() |
boolean |
contains(float e)
A Type Specific implementation of the Collection#contains function.
|
boolean |
contains(java.lang.Object o)
Deprecated.
|
ImmutableFloatList |
copy()
A Function that does a shallow clone of the Collection itself.
|
int |
count(FloatPredicate filter)
Helper function to reduce stream usage that allows to count the valid elements.
|
float[] |
extractElements(int from,
int to)
A function to fast extract elements out of the list, this removes the elements that were fetched.
|
float |
findFirst(FloatPredicate filter)
Helper function to reduce stream usage that allows to filter for the first match.
|
<E> void |
forEach(E input,
ObjectFloatConsumer<E> action)
Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
void |
forEach(FloatConsumer action)
A Type Specific foreach function that reduces (un)boxing
|
float[] |
getElements(int from,
float[] a,
int offset,
int length)
A function to fast fetch elements from the list
|
float |
getFloat(int index)
A Type-Specific get function to reduce (un)boxing
|
int |
indexOf(float e)
A Type-Specific function to find the index of a given element
|
int |
indexOf(java.lang.Object o)
Deprecated.
|
int |
lastIndexOf(float e)
A Type-Specific function to find the last index of a given element
|
int |
lastIndexOf(java.lang.Object o)
Deprecated.
|
FloatListIterator |
listIterator(int index)
A Type-Specific Iterator of listIterator
|
boolean |
matchesAll(FloatPredicate filter)
Helper function to reduce stream usage that allows to filter for all matches.
|
boolean |
matchesAny(FloatPredicate filter)
Helper function to reduce stream usage that allows to filter for any matches.
|
boolean |
matchesNone(FloatPredicate filter)
Helper function to reduce stream usage that allows to filter for no matches.
|
java.util.stream.DoubleStream |
primitiveStream()
Returns a Java-Type-Specific Stream to reduce boxing/unboxing.
|
float |
reduce(float identity,
FloatFloatUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
float |
reduce(FloatFloatUnaryOperator operator)
Performs a reduction on the
elements of this Iterable
|
boolean |
remFloat(float type)
A Type-Specific implementation of remove.
|
boolean |
remIf(java.util.function.DoublePredicate filter)
A Type-Specific removeIf function to reduce (un)boxing.
|
boolean |
removeAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
removeAll(FloatCollection c)
A Type-Specific implementation of removeAll.
|
boolean |
removeAll(FloatCollection c,
FloatConsumer r)
A Type-Specific removeAll function that reduces (un)boxing.
|
void |
removeElements(int from,
int to)
a function to fast remove elements from the list.
|
float |
removeFloat(int index)
A Type-Specific remove function to reduce (un)boxing
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Float> filter)
Deprecated.
|
void |
replaceAll(java.util.function.UnaryOperator<java.lang.Float> o)
Deprecated.
|
void |
replaceFloats(java.util.function.DoubleUnaryOperator o)
A Type-Specific replace function to reduce (un)boxing
|
boolean |
retainAll(java.util.Collection<?> c)
Deprecated.
|
boolean |
retainAll(FloatCollection c)
A Type-Specific implementation of retainAll.
|
boolean |
retainAll(FloatCollection c,
FloatConsumer r)
A Type-Specific retainAll function that reduces (un)boxing.
|
float |
set(int index,
float e)
A Type-Specific set function to reduce (un)boxing
|
int |
size()
A function to return the size of the list
|
void |
size(int size)
A function to ensure the elements are within the requested size.
|
void |
sort(FloatComparator c)
Sorts the elements specified by the Natural order either by using the Comparator or the elements
|
FloatSplititerator |
spliterator()
A Type Specific Type Splititerator to reduce boxing/unboxing
|
float |
swapRemove(int index)
A Highly Optimized remove function that removes the desired element.
|
java.lang.Object[] |
toArray()
Deprecated.
|
<E> E[] |
toArray(E[] a)
Deprecated.
|
float[] |
toFloatArray(float[] a)
A Type-Specific implementation of toArray.
|
void |
unstableSort(FloatComparator c)
Sorts the elements specified by the Natural order either by using the Comparator or the elements using a unstable sort
|
add, addAll, addAll, addAll, equals, hashCode, iterator, listIterator, subList, swapRemoveFloatadd, containsAll, containsAll, containsAny, containsAny, remove, toFloatArrayadd, addElements, addElements, addIfAbsent, addIfPresent, fillBuffer, forEachIndexed, get, getElements, remove, remove, set, sort, synchronize, synchronize, unmodifiable, unstableSortaddAll, addAll, containsAll, containsAny, containsAny, parallelPrimitiveStream, pour, toFloatArrayarrayflatMap, asAsync, distinct, filter, flatMap, forEach, limit, map, peek, pourAsList, pourAsSet, repeat, sortedof@Deprecated public ImmutableFloatList(java.util.Collection<? extends java.lang.Float> c)
c - the elements that should be added into the listpublic ImmutableFloatList(FloatCollection c)
c - the elements that should be added into the listpublic ImmutableFloatList(FloatList l)
l - the elements that should be added into the listpublic ImmutableFloatList(float... a)
a - the array that should be copiedpublic ImmutableFloatList(float[] a,
int length)
a - the array that should be copiedlength - the desired length that should be copiedpublic ImmutableFloatList(float[] a,
int offset,
int length)
a - the array that should be copiedoffset - the starting offset of where the array should be copied fromlength - the desired length that should be copiedjava.lang.IllegalStateException - if offset is smaller then 0java.lang.IllegalStateException - if the offset + length exceeds the array lengthpublic boolean add(float e)
AbstractFloatListList.add(int, Object)add in interface FloatCollectionadd in interface FloatListadd in class AbstractFloatListe - the element to addList.add(Object)public void add(int index,
float e)
FloatListindex - index at which the specified element is to be insertede - the element to addList.add(int, Object)@Deprecated
public boolean addAll(int index,
java.util.Collection<? extends java.lang.Float> c)
public boolean addAll(int index,
FloatCollection c)
FloatListindex - index at which the specified elements is to be insertedc - the elements that need to be addedList.addAll(int, java.util.Collection)public boolean addAll(int index,
FloatList c)
FloatListindex - index at which the specified elements is to be insertedc - the elements that need to be addedpublic boolean addAll(float[] e,
int offset,
int length)
FloatCollectione - the elements that should be addedoffset - where to start within the arraylength - how many elements of the array should be addedpublic void addElements(int from,
float[] a,
int offset,
int length)
FloatListfrom - the index where the elements should be added into the lista - the elements that should be addedoffset - the start index of the array should be read fromlength - how many elements should be read frompublic float[] getElements(int from,
float[] a,
int offset,
int length)
FloatListfrom - index where the list should be fetching elements froma - the array where the values should be inserted tooffset - the startIndex of where the array should be written tolength - the number of elements the values should be fetched frompublic void removeElements(int from,
int to)
FloatListfrom - the start index of where the elements should be removed from (inclusive)to - the end index of where the elements should be removed to (exclusive)public float[] extractElements(int from,
int to)
FloatListfrom - the start index of where the elements should be fetched from (inclusive)to - the end index of where the elements should be fetched to (exclusive)@Deprecated public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Float>contains in interface java.util.List<java.lang.Float>contains in interface FloatCollectioncontains in interface FloatListcontains in class AbstractFloatCollectiono - the element that is searched for@Deprecated public int indexOf(java.lang.Object o)
indexOf in interface java.util.List<java.lang.Float>indexOf in interface FloatListindexOf in class AbstractFloatListo - the element that is searched for@Deprecated public int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.List<java.lang.Float>lastIndexOf in interface FloatListlastIndexOf in class AbstractFloatListo - the element that is searched forpublic boolean contains(float e)
contains in interface FloatCollectioncontains in class AbstractFloatCollectione - the element that is searched for.public int indexOf(float e)
indexOf in interface FloatListindexOf in class AbstractFloatListe - the element that is searched forpublic int lastIndexOf(float e)
lastIndexOf in interface FloatListlastIndexOf in class AbstractFloatListe - the element that is searched forpublic void sort(FloatComparator c)
FloatListc - the sorter of the elements, can be nullList.sort(Comparator),
FloatArrays.stableSort(float[], FloatComparator)public void unstableSort(FloatComparator c)
FloatListc - the sorter of the elements, can be nullList.sort(Comparator),
FloatArrays.unstableSort(float[], FloatComparator)public float getFloat(int index)
index - the index of the element to fetchjava.lang.IndexOutOfBoundsException - if the index is out of rangeList.get(int)public ImmutableFloatList copy()
FloatCollectioncopy in interface FloatCollectioncopy in interface FloatListcopy in class AbstractFloatListpublic void forEach(FloatConsumer action)
action - The action to be performed for each elementjava.lang.NullPointerException - if the specified action is nullIterable.forEach(java.util.function.Consumer)The default implementation behaves as if:
for(int i = 0;i<size;i++)
action.accept(data[i]);
public <E> void forEach(E input,
ObjectFloatConsumer<E> action)
FloatIterableE - the generic type of the Objectinput - the object that should be includedaction - The action to be performed for each elementpublic boolean matchesAny(FloatPredicate filter)
FloatIterablefilter - that should be appliedpublic boolean matchesNone(FloatPredicate filter)
FloatIterablefilter - that should be appliedpublic boolean matchesAll(FloatPredicate filter)
FloatIterablefilter - that should be appliedpublic float findFirst(FloatPredicate filter)
FloatIterablefilter - that should be appliedpublic float reduce(float identity,
FloatFloatUnaryOperator operator)
FloatIterableidentity - the start valueoperator - the operation that should be appliedpublic float reduce(FloatFloatUnaryOperator operator)
FloatIterableoperator - the operation that should be appliedpublic int count(FloatPredicate filter)
FloatIterablefilter - that should be appliedpublic FloatListIterator listIterator(int index)
FloatListlistIterator in interface java.util.List<java.lang.Float>listIterator in interface FloatListlistIterator in class AbstractFloatListList.listIterator(int)public float set(int index,
float e)
FloatListindex - index of the element to replacee - element to be stored at the specified positionList.set(int, Object)@Deprecated public void replaceAll(java.util.function.UnaryOperator<java.lang.Float> o)
FloatListThis default implementation delegates to the corresponding type-specific function.
public void replaceFloats(java.util.function.DoubleUnaryOperator o)
FloatListo - the action to replace the valuespublic float removeFloat(int index)
FloatListindex - the index of the element to be removedList.remove(int)public float swapRemove(int index)
FloatListindex - the index of the element to be removedpublic boolean remFloat(float type)
AbstractFloatCollectionremFloat in interface FloatCollectionremFloat in class AbstractFloatCollectiontype - the element that is searched forCollection.remove(Object)@Deprecated public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Float>removeAll in interface java.util.List<java.lang.Float>removeAll in class java.util.AbstractCollection<java.lang.Float>@Deprecated public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Float>retainAll in interface java.util.List<java.lang.Float>retainAll in class java.util.AbstractCollection<java.lang.Float>@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Float> filter)
FloatCollectionThis default implementation delegates to the corresponding type-specific function.
public boolean removeAll(FloatCollection c)
AbstractFloatCollectionremoveAll in interface FloatCollectionremoveAll in class AbstractFloatCollectionc - the elements that should be deletedCollection.removeAll(Collection)public boolean retainAll(FloatCollection c)
AbstractFloatCollectionretainAll in interface FloatCollectionretainAll in class AbstractFloatCollectionc - the elements that should be keptCollection.retainAll(Collection)public boolean removeAll(FloatCollection c, FloatConsumer r)
FloatCollectionremoveAll in interface FloatCollectionremoveAll in class AbstractFloatCollectionc - the collection of elements that should be removedr - elements that got removedCollection.removeAll(Collection)public boolean retainAll(FloatCollection c, FloatConsumer r)
FloatCollectionretainAll in interface FloatCollectionretainAll in class AbstractFloatCollectionc - the collection of elements that should be keptr - elements that got removedCollection.retainAll(Collection)public boolean remIf(java.util.function.DoublePredicate filter)
FloatCollectionRemoves elements that were selected by the filter
filter - Filters the elements that should be removedCollection.removeIf(Predicate)@Deprecated public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Float>toArray in interface java.util.List<java.lang.Float>toArray in class java.util.AbstractCollection<java.lang.Float>@Deprecated public <E> E[] toArray(E[] a)
toArray in interface java.util.Collection<java.lang.Float>toArray in interface java.util.List<java.lang.Float>toArray in class java.util.AbstractCollection<java.lang.Float>a - original array. If null a Object array with the right size is created. If to small the Array of the same type is created with the right sizepublic float[] toFloatArray(float[] a)
AbstractFloatCollectiontoFloatArray in interface FloatCollectiontoFloatArray in class AbstractFloatCollectiona - array that the elements should be injected to. If null or to small a new array with the right size is createdCollection.toArray(Object[])public int size()
size in interface java.util.Collection<java.lang.Float>size in interface java.util.List<java.lang.Float>size in interface ISizeProvidersize in class java.util.AbstractCollection<java.lang.Float>public void size(int size)
FloatListsize in interface FloatListsize in class AbstractFloatListsize - the requested amount of elements/room for elementspublic 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 java.util.stream.DoubleStream primitiveStream()
public FloatSplititerator spliterator()