Serializable
, FloatBag
, MutableFloatBag
, MutableFloatCollection
, FloatIterable
, PrimitiveIterable
public 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 FormConstructor | Description |
---|---|
SynchronizedFloatBag(MutableFloatBag bag) |
|
SynchronizedFloatBag(MutableFloatBag bag,
Object newLock) |
Modifier and Type | Method | Description |
---|---|---|
void |
addOccurrences(float item,
int occurrences) |
|
LazyFloatIterable |
asLazy() |
Returns a LazyFloatIterable adapter wrapping the source FloatIterable.
|
MutableFloatBag |
asSynchronized() |
|
MutableFloatBag |
asUnmodifiable() |
|
MutableList<FloatIntPair> |
bottomOccurrences(int count) |
Returns the
count 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.
|
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() . |
MutableFloatBag |
newEmpty() |
Creates a new empty mutable version of the same Bag type.
|
int |
occurrencesOf(float item) |
The occurrences of a distinct item in the bag.
|
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.
|
MutableFloatSet |
selectUnique() |
Returns all elements of the bag that have exactly one occurrence.
|
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, 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, toBag, toList, toSet, toSortedArray, toSortedList, toString
toStringOfItemToCount
allSatisfy, anySatisfy, 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, toBag, toList, toSet, toSortedArray, toSortedList
selectDuplicates, tap
add, addAll, addAll, clear, floatIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public SynchronizedFloatBag(MutableFloatBag bag)
public SynchronizedFloatBag(MutableFloatBag bag, Object newLock)
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)
FloatIterable
select
in interface FloatBag
select
in interface FloatIterable
select
in interface MutableFloatBag
select
in interface MutableFloatCollection
select
in class AbstractSynchronizedFloatCollection
public MutableFloatBag selectByOccurrences(IntPredicate predicate)
MutableFloatBag
selectByOccurrences
in interface FloatBag
selectByOccurrences
in interface MutableFloatBag
public MutableFloatSet selectUnique()
MutableFloatBag
selectUnique
in interface FloatBag
selectUnique
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)
FloatIterable
reject
in interface FloatBag
reject
in interface FloatIterable
reject
in interface MutableFloatBag
reject
in interface MutableFloatCollection
reject
in class AbstractSynchronizedFloatCollection
public <V> MutableBag<V> collect(FloatToObjectFunction<? extends V> function)
FloatIterable
collect
in interface FloatBag
collect
in interface FloatIterable
collect
in interface MutableFloatBag
collect
in interface MutableFloatCollection
collect
in class AbstractSynchronizedFloatCollection
public boolean equals(Object otherBag)
FloatBag
Bag.equals(Object)
.public int hashCode()
FloatBag
Bag.hashCode()
.public LazyFloatIterable asLazy()
FloatIterable
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
public MutableFloatBag newEmpty()
MutableFloatBag
newEmpty
in interface MutableFloatBag
newEmpty
in interface MutableFloatCollection
Copyright © 2004–2019. All rights reserved.