@ThreadSafe public final class SynchronizedFloatBag extends AbstractSynchronizedFloatCollection implements MutableFloatBag
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.
MutableFloatBag.asSynchronized()
,
MutableBag.asSynchronized()
,
Serialized FormModifier and Type | Method and Description |
---|---|
void |
addOccurrences(float item,
int occurrences) |
LazyFloatIterable |
asLazy() |
MutableFloatBag |
asSynchronized() |
MutableFloatBag |
asUnmodifiable() |
MutableList<FloatIntPair> |
bottomOccurrences(int count)
Returns the
count least frequently occurring items. |
<V> MutableBag<V> |
collect(FloatToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object) . |
void |
forEachWithOccurrences(FloatIntProcedure procedure)
For each distinct item, with the number of occurrences, execute the specified procedure.
|
int |
hashCode()
Follows the same general contract as
Bag.hashCode() . |
int |
occurrencesOf(float item)
The occurrences of a distinct item in the bag.
|
MutableFloatBag |
reject(FloatPredicate predicate) |
boolean |
removeOccurrences(float item,
int occurrences) |
MutableFloatBag |
select(FloatPredicate predicate) |
MutableFloatBag |
selectByOccurrences(IntPredicate predicate)
Returns all elements of the bag that have a number of occurrences that satisfy the predicate.
|
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableFloatBag |
toImmutable()
Returns an immutable copy of this bag.
|
MutableList<FloatIntPair> |
topOccurrences(int count)
Returns the
count most frequently occurring items. |
SynchronizedFloatBag |
with(float element) |
SynchronizedFloatBag |
withAll(FloatIterable elements) |
SynchronizedFloatBag |
without(float element) |
SynchronizedFloatBag |
withoutAll(FloatIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, each, floatIterator, forEach, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
add, addAll, addAll, clear, floatIterator, remove, removeAll, removeAll, retainAll, retainAll
allSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public SynchronizedFloatBag with(float element)
with
in interface MutableFloatBag
with
in interface MutableFloatCollection
with
in class AbstractSynchronizedFloatCollection
public SynchronizedFloatBag without(float element)
without
in interface MutableFloatBag
without
in interface MutableFloatCollection
without
in class AbstractSynchronizedFloatCollection
public SynchronizedFloatBag withAll(FloatIterable elements)
withAll
in interface MutableFloatBag
withAll
in interface MutableFloatCollection
withAll
in class AbstractSynchronizedFloatCollection
public SynchronizedFloatBag withoutAll(FloatIterable elements)
withoutAll
in interface MutableFloatBag
withoutAll
in interface MutableFloatCollection
withoutAll
in class AbstractSynchronizedFloatCollection
public void addOccurrences(float item, int occurrences)
addOccurrences
in interface MutableFloatBag
public boolean removeOccurrences(float item, int occurrences)
removeOccurrences
in interface MutableFloatBag
public int sizeDistinct()
FloatBag
sizeDistinct
in interface FloatBag
public int occurrencesOf(float item)
FloatBag
occurrencesOf
in interface FloatBag
public void forEachWithOccurrences(FloatIntProcedure procedure)
FloatBag
forEachWithOccurrences
in interface FloatBag
public MutableFloatBag select(FloatPredicate predicate)
select
in interface FloatBag
select
in interface MutableFloatBag
select
in interface MutableFloatCollection
select
in interface FloatIterable
select
in class AbstractSynchronizedFloatCollection
public MutableFloatBag selectByOccurrences(IntPredicate predicate)
MutableFloatBag
selectByOccurrences
in interface FloatBag
selectByOccurrences
in interface MutableFloatBag
public MutableList<FloatIntPair> topOccurrences(int count)
MutableFloatBag
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.topOccurrences
in interface FloatBag
topOccurrences
in interface MutableFloatBag
public MutableList<FloatIntPair> bottomOccurrences(int count)
MutableFloatBag
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.bottomOccurrences
in interface FloatBag
bottomOccurrences
in interface MutableFloatBag
public MutableFloatBag reject(FloatPredicate predicate)
reject
in interface FloatBag
reject
in interface MutableFloatBag
reject
in interface MutableFloatCollection
reject
in interface FloatIterable
reject
in class AbstractSynchronizedFloatCollection
public <V> MutableBag<V> collect(FloatToObjectFunction<? extends V> function)
collect
in interface FloatBag
collect
in interface MutableFloatBag
collect
in interface MutableFloatCollection
collect
in interface FloatIterable
collect
in class AbstractSynchronizedFloatCollection
public boolean equals(Object otherBag)
FloatBag
Bag.equals(Object)
.public int hashCode()
FloatBag
Bag.hashCode()
.public LazyFloatIterable asLazy()
asLazy
in interface FloatIterable
asLazy
in class AbstractSynchronizedFloatCollection
public MutableFloatBag asUnmodifiable()
asUnmodifiable
in interface MutableFloatBag
asUnmodifiable
in interface MutableFloatCollection
asUnmodifiable
in class AbstractSynchronizedFloatCollection
public MutableFloatBag asSynchronized()
asSynchronized
in interface MutableFloatBag
asSynchronized
in interface MutableFloatCollection
asSynchronized
in class AbstractSynchronizedFloatCollection
public ImmutableFloatBag toImmutable()
MutableFloatBag
toImmutable
in interface FloatBag
toImmutable
in interface MutableFloatBag
toImmutable
in interface MutableFloatCollection
toImmutable
in class AbstractSynchronizedFloatCollection
Copyright © 2004–2016. All rights reserved.