Interface MutableFloatList
- All Superinterfaces:
FloatIterable
,FloatList
,MutableFloatCollection
,OrderedFloatIterable
,PrimitiveIterable
,ReversibleFloatIterable
- All Known Implementing Classes:
FloatArrayList
,SynchronizedFloatList
,UnmodifiableFloatList
public interface MutableFloatList extends MutableFloatCollection, FloatList
This file was automatically generated from template file mutablePrimitiveList.stg.
- Since:
- 3.0.
-
Method Summary
Modifier and Type Method Description boolean
addAllAtIndex(int index, float... source)
boolean
addAllAtIndex(int index, FloatIterable source)
void
addAtIndex(int index, float element)
MutableFloatList
asSynchronized()
MutableFloatList
asUnmodifiable()
<V> MutableList<V>
collect(FloatToObjectFunction<? extends V> function)
Returns a new collection with the results of applying the specified function on each element of the source collection.default <V> MutableList<V>
collectWithIndex(FloatIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.MutableFloatList
distinct()
default MutableFloatList
newEmpty()
Creates a new empty mutable version of the same List type.MutableFloatList
reject(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.float
removeAtIndex(int index)
MutableFloatList
reverseThis()
MutableFloatList
select(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.float
set(int index, float element)
default MutableFloatList
shuffleThis()
Randomly permutes this list mutating its contents and returns the same list (this).default MutableFloatList
shuffleThis(Random rnd)
Randomly permutes this list mutating its contents and returns the same list (this).MutableFloatList
sortThis()
Sorts this list mutating its contents and returns the same mutable list (this).default MutableFloatList
sortThis(FloatComparator comparator)
Sorts the internal data structure of this list and returns the list itself as a convenience.default <T> MutableFloatList
sortThisBy(FloatToObjectFunction<T> function)
Sorts the internal data structure of this list based on the natural order of the key returned byfunction
.default <T> MutableFloatList
sortThisBy(FloatToObjectFunction<T> function, Comparator<? super T> comparator)
Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
.MutableFloatList
subList(int fromIndex, int toIndex)
default void
swap(int index1, int index2)
default MutableFloatList
tap(FloatProcedure procedure)
ImmutableFloatList
toImmutable()
Returns an immutable copy of this list.MutableFloatList
toReversed()
MutableFloatList
with(float element)
MutableFloatList
withAll(FloatIterable elements)
MutableFloatList
without(float element)
MutableFloatList
withoutAll(FloatIterable elements)
default <T> MutableList<FloatObjectPair<T>>
zip(Iterable<T> list)
Returns aMutableList
formed from thisMutableFloatList
and aListIterable
by combining corresponding elements in pairs.default MutableList<FloatFloatPair>
zipFloat(FloatIterable iterable)
Returns aMutableList
formed from thisMutableFloatList
and anotherFloatList
by combining corresponding elements in pairs.Methods inherited from interface org.eclipse.collections.api.FloatIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, count, detectIfNone, each, flatCollect, forEach, injectInto, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList
Methods inherited from interface org.eclipse.collections.api.list.primitive.FloatList
binarySearch, dotProduct, equals, get, hashCode, lastIndexOf
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableFloatCollection
add, addAll, addAll, clear, floatIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedFloatIterable
collectWithIndex, forEachWithIndex, getFirst, indexOf
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.ReversibleFloatIterable
asReversed, getLast, injectIntoWithIndex
-
Method Details
-
addAtIndex
void addAtIndex(int index, float element) -
addAllAtIndex
boolean addAllAtIndex(int index, float... source) -
addAllAtIndex
-
removeAtIndex
float removeAtIndex(int index) -
set
float set(int index, float element) -
swap
default void swap(int index1, int index2) -
select
Description copied from interface:FloatIterable
Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.- Specified by:
select
in interfaceFloatIterable
- Specified by:
select
in interfaceFloatList
- Specified by:
select
in interfaceMutableFloatCollection
- Specified by:
select
in interfaceOrderedFloatIterable
- Specified by:
select
in interfaceReversibleFloatIterable
-
reject
Description copied from interface:FloatIterable
Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.- Specified by:
reject
in interfaceFloatIterable
- Specified by:
reject
in interfaceFloatList
- Specified by:
reject
in interfaceMutableFloatCollection
- Specified by:
reject
in interfaceOrderedFloatIterable
- Specified by:
reject
in interfaceReversibleFloatIterable
-
with
- Specified by:
with
in interfaceMutableFloatCollection
-
without
- Specified by:
without
in interfaceMutableFloatCollection
-
withAll
- Specified by:
withAll
in interfaceMutableFloatCollection
-
withoutAll
- Specified by:
withoutAll
in interfaceMutableFloatCollection
-
tap
- Specified by:
tap
in interfaceFloatIterable
- Specified by:
tap
in interfaceFloatList
- Specified by:
tap
in interfaceMutableFloatCollection
- Since:
- 9.0.
-
collect
Description copied from interface:FloatIterable
Returns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collect
in interfaceFloatIterable
- Specified by:
collect
in interfaceFloatList
- Specified by:
collect
in interfaceMutableFloatCollection
- Specified by:
collect
in interfaceOrderedFloatIterable
- Specified by:
collect
in interfaceReversibleFloatIterable
-
collectWithIndex
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceFloatList
- Specified by:
collectWithIndex
in interfaceOrderedFloatIterable
- Specified by:
collectWithIndex
in interfaceReversibleFloatIterable
- Since:
- 9.1.
-
reverseThis
MutableFloatList reverseThis() -
toReversed
MutableFloatList toReversed()- Specified by:
toReversed
in interfaceFloatList
- Specified by:
toReversed
in interfaceReversibleFloatIterable
-
distinct
MutableFloatList distinct()- Specified by:
distinct
in interfaceFloatList
- Specified by:
distinct
in interfaceReversibleFloatIterable
- Since:
- 6.0.
-
sortThis
MutableFloatList sortThis()Sorts this list mutating its contents and returns the same mutable list (this). -
sortThis
Sorts the internal data structure of this list and returns the list itself as a convenience. -
sortThisBy
Sorts the internal data structure of this list based on the natural order of the key returned byfunction
. -
sortThisBy
default <T> MutableFloatList sortThisBy(FloatToObjectFunction<T> function, Comparator<? super T> comparator)Sorts the internal data structure of this list based on the key returned byfunction
using the providedcomparator
. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Usesjava.util.Random
as the source of randomness. -
shuffleThis
Randomly permutes this list mutating its contents and returns the same list (this). Implements the Fisher-Yates shuffle algorithm using the provided source of randomness. -
asUnmodifiable
MutableFloatList asUnmodifiable()- Specified by:
asUnmodifiable
in interfaceMutableFloatCollection
-
asSynchronized
MutableFloatList asSynchronized()- Specified by:
asSynchronized
in interfaceMutableFloatCollection
-
toImmutable
ImmutableFloatList toImmutable()Returns an immutable copy of this list.- Specified by:
toImmutable
in interfaceFloatList
- Specified by:
toImmutable
in interfaceMutableFloatCollection
-
subList
- Specified by:
subList
in interfaceFloatList
- See Also:
List.subList(int fromIndex, int toIndex)
-
zipFloat
Returns aMutableList
formed from thisMutableFloatList
and anotherFloatList
by combining corresponding elements in pairs. If one of the twoFloatList
s is longer than the other, its remaining elements are ignored. -
zip
Returns aMutableList
formed from thisMutableFloatList
and aListIterable
by combining corresponding elements in pairs. If one of the two Lists is longer than the other, its remaining elements are ignored. -
newEmpty
Creates a new empty mutable version of the same List type.- Specified by:
newEmpty
in interfaceMutableFloatCollection
- Since:
- 9.2.
-