Interface MutableFloatBag
-
- All Superinterfaces:
FloatBag
,FloatIterable
,MutableFloatCollection
,PrimitiveIterable
- All Known Implementing Classes:
FloatHashBag
,SynchronizedFloatBag
,UnmodifiableFloatBag
public interface MutableFloatBag extends MutableFloatCollection, FloatBag
This file was automatically generated from template file mutablePrimitiveBag.stg.- Since:
- 3.0.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
addOccurrences(float item, int occurrences)
MutableFloatBag
asSynchronized()
MutableFloatBag
asUnmodifiable()
MutableList<FloatIntPair>
bottomOccurrences(int count)
Returns thecount
least frequently occurring items.<V> MutableBag<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 MutableFloatBag
newEmpty()
Creates a new empty mutable version of the same Bag type.MutableFloatBag
reject(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.boolean
removeOccurrences(float item, int occurrences)
MutableFloatBag
select(FloatPredicate predicate)
Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.MutableFloatBag
selectByOccurrences(IntPredicate predicate)
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.default MutableFloatBag
selectDuplicates()
Returns all elements of the bag that have more than one occurrence.MutableFloatSet
selectUnique()
Returns all elements of the bag that have exactly one occurrence.default MutableFloatBag
tap(FloatProcedure procedure)
ImmutableFloatBag
toImmutable()
Returns an immutable copy of this bag.MutableList<FloatIntPair>
topOccurrences(int count)
Returns thecount
most frequently occurring items.MutableFloatBag
with(float element)
MutableFloatBag
withAll(FloatIterable elements)
MutableFloatBag
without(float element)
MutableFloatBag
withoutAll(FloatIterable elements)
-
Methods inherited from interface org.eclipse.collections.api.bag.primitive.FloatBag
equals, forEachWithOccurrences, hashCode, occurrencesOf, sizeDistinct, toStringOfItemToCount
-
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, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
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.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Method Detail
-
addOccurrences
void addOccurrences(float item, int occurrences)
-
removeOccurrences
boolean removeOccurrences(float item, int occurrences)
-
tap
default MutableFloatBag tap(FloatProcedure procedure)
- Specified by:
tap
in interfaceFloatBag
- Specified by:
tap
in interfaceFloatIterable
- Specified by:
tap
in interfaceMutableFloatCollection
- Since:
- 9.0.
-
selectByOccurrences
MutableFloatBag selectByOccurrences(IntPredicate predicate)
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.- Specified by:
selectByOccurrences
in interfaceFloatBag
- Since:
- 8.0
-
selectDuplicates
default MutableFloatBag selectDuplicates()
Returns all elements of the bag that have more than one occurrence.- Specified by:
selectDuplicates
in interfaceFloatBag
- Since:
- 9.2
-
selectUnique
MutableFloatSet selectUnique()
Returns all elements of the bag that have exactly one occurrence.- Specified by:
selectUnique
in interfaceFloatBag
- Since:
- 9.2
-
topOccurrences
MutableList<FloatIntPair> topOccurrences(int count)
Returns thecount
most frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.- Specified by:
topOccurrences
in interfaceFloatBag
- Since:
- 8.0
-
bottomOccurrences
MutableList<FloatIntPair> bottomOccurrences(int count)
Returns thecount
least frequently occurring items. In the event of a tie, all of the items with the number of occurrences that match the occurrences of the last item will be returned.- Specified by:
bottomOccurrences
in interfaceFloatBag
- Since:
- 8.0
-
select
MutableFloatBag select(FloatPredicate predicate)
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 interfaceFloatBag
- Specified by:
select
in interfaceFloatIterable
- Specified by:
select
in interfaceMutableFloatCollection
-
reject
MutableFloatBag reject(FloatPredicate predicate)
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 interfaceFloatBag
- Specified by:
reject
in interfaceFloatIterable
- Specified by:
reject
in interfaceMutableFloatCollection
-
collect
<V> MutableBag<V> collect(FloatToObjectFunction<? extends V> function)
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 interfaceFloatBag
- Specified by:
collect
in interfaceFloatIterable
- Specified by:
collect
in interfaceMutableFloatCollection
-
with
MutableFloatBag with(float element)
- Specified by:
with
in interfaceMutableFloatCollection
-
without
MutableFloatBag without(float element)
- Specified by:
without
in interfaceMutableFloatCollection
-
withAll
MutableFloatBag withAll(FloatIterable elements)
- Specified by:
withAll
in interfaceMutableFloatCollection
-
withoutAll
MutableFloatBag withoutAll(FloatIterable elements)
- Specified by:
withoutAll
in interfaceMutableFloatCollection
-
asUnmodifiable
MutableFloatBag asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableFloatCollection
-
asSynchronized
MutableFloatBag asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableFloatCollection
-
toImmutable
ImmutableFloatBag toImmutable()
Returns an immutable copy of this bag.- Specified by:
toImmutable
in interfaceFloatBag
- Specified by:
toImmutable
in interfaceMutableFloatCollection
-
newEmpty
default MutableFloatBag newEmpty()
Creates a new empty mutable version of the same Bag type.- Specified by:
newEmpty
in interfaceMutableFloatCollection
- Since:
- 9.2.
-
-