Top Description Fields Constructors Methods
org.eclipse.collections.impl.bag.mutable.primitive

public Class SynchronizedFloatBag

extends AbstractSynchronizedFloatCollection
implements MutableFloatBag
Class Inheritance
All Implemented Interfaces
org.eclipse.collections.api.bag.primitive.MutableFloatBag, org.eclipse.collections.api.bag.primitive.FloatBag, org.eclipse.collections.api.FloatIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableFloatCollection
Imports
java.util.Collection, .Collections, org.eclipse.collections.api.FloatIterable, .LazyFloatIterable, org.eclipse.collections.api.bag.MutableBag, org.eclipse.collections.api.bag.primitive.ImmutableFloatBag, .MutableFloatBag, org.eclipse.collections.api.block.function.primitive.FloatToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, .FloatPredicate, org.eclipse.collections.api.block.procedure.primitive.FloatIntProcedure, org.eclipse.collections.api.iterator.FloatIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.tuple.primitive.FloatIntPair, org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection, org.eclipse.collections.impl.factory.primitive.FloatBags, org.eclipse.collections.impl.lazy.primitive.LazyFloatIterableAdapter, org.eclipse.collections.api.set.primitive.MutableFloatSet

A synchronized view of a MutableFloatBag. It is imperative that the user manually synchronize on the collection when iterating over it using the FloatIterator, as per Collections#synchronizedCollection(Collection).

This file was automatically generated from template file synchronizedPrimitiveBag.stg.

Since
3.1.
See Also
MutableFloatBag#asSynchronized(), MutableBag#asSynchronized()

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public void
public LazyFloatIterable
public MutableFloatBag
public MutableFloatBag
public MutableList<FloatIntPair>
bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.bottomOccurrences.

Returns the count least frequently occurring items.

public <V> MutableBag<V>
public boolean
equals(Object otherBag)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.bag.primitive.FloatBag.equals.

Follows the same general contract as Bag#equals(Object).

public void
forEachWithOccurrences(FloatIntProcedure procedure)

Implements org.eclipse.collections.api.bag.primitive.FloatBag.forEachWithOccurrences.

For each distinct item, with the number of occurrences, execute the specified procedure.

private MutableFloatBag
public int
public MutableFloatBag
public int
occurrencesOf(float item)

Implements org.eclipse.collections.api.bag.primitive.FloatBag.occurrencesOf.

The occurrences of a distinct item in the bag.

public MutableFloatBag
public boolean
public MutableFloatBag
public MutableFloatBag
selectByOccurrences(IntPredicate predicate)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

public MutableFloatSet
selectUnique()

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

public int
sizeDistinct()

Implements org.eclipse.collections.api.bag.primitive.FloatBag.sizeDistinct.

The size of the Bag when counting only distinct elements.

public ImmutableFloatBag
public MutableList<FloatIntPair>
topOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.topOccurrences.

Returns the count most frequently occurring items.

public SynchronizedFloatBag
public SynchronizedFloatBag
public SynchronizedFloatBag
public SynchronizedFloatBag
Inherited from org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection:
addaddAlladdAllallSatisfyanySatisfyappendStringappendStringappendStringaveragechunkclearcontainscontainsAllcontainsAllcontainsAnycontainsAnycontainsNonecontainsNonecountdetectIfNoneeachfloatIteratorgetFloatCollectiongetLockinjectIntoisEmptymakeStringmakeStringmakeStringmaxmaxIfEmptymedianminminIfEmptynoneSatisfynotEmptyreducereduceIfEmptyremoveremoveAllremoveAllremoveIfretainAllretainAllsizesumtoArraytoArraytoBagtoListtoSettoSortedArraytoSortedListtoString

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.serialVersionUID.

Constructor Detail

SynchronizedFloatBagback to summary
public SynchronizedFloatBag(MutableFloatBag bag)
SynchronizedFloatBagback to summary
public SynchronizedFloatBag(MutableFloatBag bag, Object newLock)

Method Detail

addOccurrencesback to summary
public void addOccurrences(float item, int occurrences)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.addOccurrences.

Annotations
@Override
asLazyback to summary
public LazyFloatIterable asLazy()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.asLazy.

Implements org.eclipse.collections.api.FloatIterable.asLazy.

Doc from org.eclipse.collections.api.FloatIterable.asLazy.

Returns a LazyFloatIterable adapter wrapping the source FloatIterable.

Annotations
@Override
asSynchronizedback to summary
public MutableFloatBag asSynchronized()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.asSynchronized.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.asSynchronized, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.asSynchronized.

Annotations
@Override
asUnmodifiableback to summary
public MutableFloatBag asUnmodifiable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.asUnmodifiable.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.asUnmodifiable, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.asUnmodifiable.

Annotations
@Override
bottomOccurrencesback to summary
public MutableList<FloatIntPair> bottomOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.bottomOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableFloatBag.bottomOccurrences.

Returns the count 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.

Annotations
@Override
collectback to summary
public <V> MutableBag<V> collect(FloatToObjectFunction<? extends V> function)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.collect.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.collect, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.collect.

Doc from org.eclipse.collections.api.FloatIterable.collect.

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.

Annotations
@Override
equalsback to summary
public boolean equals(Object otherBag)

Overrides java.lang.Object.equals.

Implements org.eclipse.collections.api.bag.primitive.FloatBag.equals.

Doc from org.eclipse.collections.api.bag.primitive.FloatBag.equals.

Follows the same general contract as Bag#equals(Object).

Annotations
@Override
forEachWithOccurrencesback to summary
public void forEachWithOccurrences(FloatIntProcedure procedure)

Implements org.eclipse.collections.api.bag.primitive.FloatBag.forEachWithOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.FloatBag.forEachWithOccurrences.

For each distinct item, with the number of occurrences, execute the specified procedure.

Annotations
@Override
getMutableFloatBagback to summary
private MutableFloatBag getMutableFloatBag()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Implements org.eclipse.collections.api.bag.primitive.FloatBag.hashCode.

Doc from org.eclipse.collections.api.bag.primitive.FloatBag.hashCode.

Follows the same general contract as Bag#hashCode().

Annotations
@Override
newEmptyback to summary
public MutableFloatBag newEmpty()

Overrides default org.eclipse.collections.api.bag.primitive.MutableFloatBag.newEmpty, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.newEmpty.

Doc from org.eclipse.collections.api.bag.primitive.MutableFloatBag.newEmpty.

Creates a new empty mutable version of the same Bag type.

Annotations
@Override
Since
9.2.
occurrencesOfback to summary
public int occurrencesOf(float item)

Implements org.eclipse.collections.api.bag.primitive.FloatBag.occurrencesOf.

Doc from org.eclipse.collections.api.bag.primitive.FloatBag.occurrencesOf.

The occurrences of a distinct item in the bag.

Annotations
@Override
rejectback to summary
public MutableFloatBag reject(FloatPredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.reject.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.reject, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.reject.

Doc from org.eclipse.collections.api.FloatIterable.reject.

Returns a new FloatIterable with all of the elements in the FloatIterable that return false for the specified predicate.

Annotations
@Override
removeOccurrencesback to summary
public boolean removeOccurrences(float item, int occurrences)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.removeOccurrences.

Annotations
@Override
selectback to summary
public MutableFloatBag select(FloatPredicate predicate)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.select.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.select, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.select.

Doc from org.eclipse.collections.api.FloatIterable.select.

Returns a new FloatIterable with all of the elements in the FloatIterable that return true for the specified predicate.

Annotations
@Override
selectByOccurrencesback to summary
public MutableFloatBag selectByOccurrences(IntPredicate predicate)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.selectByOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableFloatBag.selectByOccurrences.

Returns all elements of the bag that have a number of occurrences that satisfy the predicate.

Annotations
@Override
selectUniqueback to summary
public MutableFloatSet selectUnique()

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.selectUnique.

Doc from org.eclipse.collections.api.bag.primitive.MutableFloatBag.selectUnique.

Returns all elements of the bag that have exactly one occurrence.

Annotations
@Override
sizeDistinctback to summary
public int sizeDistinct()

Implements org.eclipse.collections.api.bag.primitive.FloatBag.sizeDistinct.

Doc from org.eclipse.collections.api.bag.primitive.FloatBag.sizeDistinct.

The size of the Bag when counting only distinct elements.

Annotations
@Override
toImmutableback to summary
public ImmutableFloatBag toImmutable()

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.toImmutable.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.toImmutable, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.toImmutable.

Doc from org.eclipse.collections.api.bag.primitive.MutableFloatBag.toImmutable.

Returns an immutable copy of this bag.

Annotations
@Override
topOccurrencesback to summary
public MutableList<FloatIntPair> topOccurrences(int count)

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.topOccurrences.

Doc from org.eclipse.collections.api.bag.primitive.MutableFloatBag.topOccurrences.

Returns the count 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.

Annotations
@Override
withback to summary
public SynchronizedFloatBag with(float element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.with.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.with, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.with.

Annotations
@Override
withAllback to summary
public SynchronizedFloatBag withAll(FloatIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.withAll.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.withAll, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.withAll.

Annotations
@Override
withoutback to summary
public SynchronizedFloatBag without(float element)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.without.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.without, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.without.

Annotations
@Override
withoutAllback to summary
public SynchronizedFloatBag withoutAll(FloatIterable elements)

Overrides org.eclipse.collections.impl.collection.mutable.primitive.AbstractSynchronizedFloatCollection.withoutAll.

Implements org.eclipse.collections.api.bag.primitive.MutableFloatBag.withoutAll, org.eclipse.collections.api.collection.primitive.MutableFloatCollection.withoutAll.

Annotations
@Override