Class UnmodifiableFloatBag
java.lang.Object
org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableFloatCollection
org.eclipse.collections.impl.bag.mutable.primitive.UnmodifiableFloatBag
- All Implemented Interfaces:
Serializable,FloatBag,MutableFloatBag,MutableFloatCollection,FloatIterable,PrimitiveIterable
public class UnmodifiableFloatBag extends AbstractUnmodifiableFloatCollection implements MutableFloatBag
This file was automatically generated from template file unmodifiablePrimitiveBag.stg.
- Since:
- 3.1.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description UnmodifiableFloatBag(MutableFloatBag bag) -
Method Summary
Modifier and Type Method Description voidaddOccurrences(float item, int occurrences)MutableFloatBagasSynchronized()MutableFloatBagasUnmodifiable()MutableList<FloatIntPair>bottomOccurrences(int count)Returns thecountleast 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.booleanequals(Object otherBag)Follows the same general contract asBag.equals(Object).voidforEachWithOccurrences(FloatIntProcedure procedure)For each distinct item, with the number of occurrences, execute the specified procedure.inthashCode()Follows the same general contract asBag.hashCode().MutableFloatBagnewEmpty()Creates a new empty mutable version of the same Bag type.intoccurrencesOf(float item)The occurrences of a distinct item in the bag.MutableFloatBagreject(FloatPredicate predicate)Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.booleanremoveOccurrences(float item, int occurrences)MutableFloatBagselect(FloatPredicate predicate)Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.MutableFloatBagselectByOccurrences(IntPredicate predicate)Returns all elements of the bag that have a number of occurrences that satisfy the predicate.MutableFloatSetselectUnique()Returns all elements of the bag that have exactly one occurrence.intsizeDistinct()The size of the Bag when counting only distinct elements.ImmutableFloatBagtoImmutable()Returns an immutable copy of this bag.MutableList<FloatIntPair>topOccurrences(int count)Returns thecountmost frequently occurring items.UnmodifiableFloatBagwith(float element)UnmodifiableFloatBagwithAll(FloatIterable elements)UnmodifiableFloatBagwithout(float element)UnmodifiableFloatBagwithoutAll(FloatIterable elements)Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableFloatCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, count, detectIfNone, each, floatIterator, forEach, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.bag.primitive.FloatBag
toStringOfItemToCountMethods 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, toSortedListMethods inherited from interface org.eclipse.collections.api.bag.primitive.MutableFloatBag
selectDuplicates, tapMethods inherited from interface org.eclipse.collections.api.collection.primitive.MutableFloatCollection
add, addAll, addAll, clear, floatIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAllMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
Constructor Details
-
Method Details
-
with
- Specified by:
within interfaceMutableFloatBag- Specified by:
within interfaceMutableFloatCollection- Overrides:
within classAbstractUnmodifiableFloatCollection
-
without
- Specified by:
withoutin interfaceMutableFloatBag- Specified by:
withoutin interfaceMutableFloatCollection- Overrides:
withoutin classAbstractUnmodifiableFloatCollection
-
withAll
- Specified by:
withAllin interfaceMutableFloatBag- Specified by:
withAllin interfaceMutableFloatCollection- Overrides:
withAllin classAbstractUnmodifiableFloatCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableFloatBag- Specified by:
withoutAllin interfaceMutableFloatCollection- Overrides:
withoutAllin classAbstractUnmodifiableFloatCollection
-
addOccurrences
public void addOccurrences(float item, int occurrences)- Specified by:
addOccurrencesin interfaceMutableFloatBag
-
removeOccurrences
public boolean removeOccurrences(float item, int occurrences)- Specified by:
removeOccurrencesin interfaceMutableFloatBag
-
sizeDistinct
public int sizeDistinct()Description copied from interface:FloatBagThe size of the Bag when counting only distinct elements.- Specified by:
sizeDistinctin interfaceFloatBag
-
occurrencesOf
public int occurrencesOf(float item)Description copied from interface:FloatBagThe occurrences of a distinct item in the bag.- Specified by:
occurrencesOfin interfaceFloatBag
-
forEachWithOccurrences
Description copied from interface:FloatBagFor each distinct item, with the number of occurrences, execute the specified procedure.- Specified by:
forEachWithOccurrencesin interfaceFloatBag
-
selectByOccurrences
Description copied from interface:MutableFloatBagReturns all elements of the bag that have a number of occurrences that satisfy the predicate.- Specified by:
selectByOccurrencesin interfaceFloatBag- Specified by:
selectByOccurrencesin interfaceMutableFloatBag
-
selectUnique
Description copied from interface:MutableFloatBagReturns all elements of the bag that have exactly one occurrence.- Specified by:
selectUniquein interfaceFloatBag- Specified by:
selectUniquein interfaceMutableFloatBag
-
topOccurrences
Description copied from interface:MutableFloatBagReturns thecountmost 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:
topOccurrencesin interfaceFloatBag- Specified by:
topOccurrencesin interfaceMutableFloatBag
-
bottomOccurrences
Description copied from interface:MutableFloatBagReturns thecountleast 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:
bottomOccurrencesin interfaceFloatBag- Specified by:
bottomOccurrencesin interfaceMutableFloatBag
-
select
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.- Specified by:
selectin interfaceFloatBag- Specified by:
selectin interfaceFloatIterable- Specified by:
selectin interfaceMutableFloatBag- Specified by:
selectin interfaceMutableFloatCollection- Overrides:
selectin classAbstractUnmodifiableFloatCollection
-
reject
Description copied from interface:FloatIterableReturns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.- Specified by:
rejectin interfaceFloatBag- Specified by:
rejectin interfaceFloatIterable- Specified by:
rejectin interfaceMutableFloatBag- Specified by:
rejectin interfaceMutableFloatCollection- Overrides:
rejectin classAbstractUnmodifiableFloatCollection
-
collect
Description copied from interface:FloatIterableReturns 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:
collectin interfaceFloatBag- Specified by:
collectin interfaceFloatIterable- Specified by:
collectin interfaceMutableFloatBag- Specified by:
collectin interfaceMutableFloatCollection- Overrides:
collectin classAbstractUnmodifiableFloatCollection
-
equals
Description copied from interface:FloatBagFollows the same general contract asBag.equals(Object). -
hashCode
public int hashCode()Description copied from interface:FloatBagFollows the same general contract asBag.hashCode(). -
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableFloatBag- Specified by:
asUnmodifiablein interfaceMutableFloatCollection- Overrides:
asUnmodifiablein classAbstractUnmodifiableFloatCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableFloatBag- Specified by:
asSynchronizedin interfaceMutableFloatCollection- Overrides:
asSynchronizedin classAbstractUnmodifiableFloatCollection
-
toImmutable
Description copied from interface:MutableFloatBagReturns an immutable copy of this bag.- Specified by:
toImmutablein interfaceFloatBag- Specified by:
toImmutablein interfaceMutableFloatBag- Specified by:
toImmutablein interfaceMutableFloatCollection- Overrides:
toImmutablein classAbstractUnmodifiableFloatCollection
-
newEmpty
Description copied from interface:MutableFloatBagCreates a new empty mutable version of the same Bag type.- Specified by:
newEmptyin interfaceMutableFloatBag- Specified by:
newEmptyin interfaceMutableFloatCollection- Since:
- 9.2.
-