FloatBag, MutableFloatBag, MutableFloatCollection, FloatIterable, PrimitiveIterablepublic 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 Form| Constructor | Description |
|---|---|
SynchronizedFloatBag(MutableFloatBag bag) |
|
SynchronizedFloatBag(MutableFloatBag bag,
java.lang.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(java.lang.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, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringtoStringOfItemToCountallSatisfy, 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, reject, select, sum, summaryStatistics, toArray, toBag, toList, toSet, toSortedArray, toSortedListselectDuplicates, tapadd, addAll, addAll, clear, floatIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAllappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic SynchronizedFloatBag(MutableFloatBag bag)
public SynchronizedFloatBag(MutableFloatBag bag, java.lang.Object newLock)
public SynchronizedFloatBag with(float element)
with in interface MutableFloatBagwith in interface MutableFloatCollectionwith in class AbstractSynchronizedFloatCollectionpublic SynchronizedFloatBag without(float element)
without in interface MutableFloatBagwithout in interface MutableFloatCollectionwithout in class AbstractSynchronizedFloatCollectionpublic SynchronizedFloatBag withAll(FloatIterable elements)
withAll in interface MutableFloatBagwithAll in interface MutableFloatCollectionwithAll in class AbstractSynchronizedFloatCollectionpublic SynchronizedFloatBag withoutAll(FloatIterable elements)
withoutAll in interface MutableFloatBagwithoutAll in interface MutableFloatCollectionwithoutAll in class AbstractSynchronizedFloatCollectionpublic void addOccurrences(float item,
int occurrences)
addOccurrences in interface MutableFloatBagpublic boolean removeOccurrences(float item,
int occurrences)
removeOccurrences in interface MutableFloatBagpublic int sizeDistinct()
FloatBagsizeDistinct in interface FloatBagpublic int occurrencesOf(float item)
FloatBagoccurrencesOf in interface FloatBagpublic void forEachWithOccurrences(FloatIntProcedure procedure)
FloatBagforEachWithOccurrences in interface FloatBagpublic MutableFloatBag select(FloatPredicate predicate)
FloatIterableselect in interface FloatBagselect in interface FloatIterableselect in interface MutableFloatBagselect in interface MutableFloatCollectionselect in class AbstractSynchronizedFloatCollectionpublic MutableFloatBag selectByOccurrences(IntPredicate predicate)
MutableFloatBagselectByOccurrences in interface FloatBagselectByOccurrences in interface MutableFloatBagpublic MutableFloatSet selectUnique()
MutableFloatBagselectUnique in interface FloatBagselectUnique in interface MutableFloatBagpublic MutableList<FloatIntPair> topOccurrences(int count)
MutableFloatBagcount 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 FloatBagtopOccurrences in interface MutableFloatBagpublic MutableList<FloatIntPair> bottomOccurrences(int count)
MutableFloatBagcount 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 FloatBagbottomOccurrences in interface MutableFloatBagpublic MutableFloatBag reject(FloatPredicate predicate)
FloatIterablereject in interface FloatBagreject in interface FloatIterablereject in interface MutableFloatBagreject in interface MutableFloatCollectionreject in class AbstractSynchronizedFloatCollectionpublic <V> MutableBag<V> collect(FloatToObjectFunction<? extends V> function)
FloatIterablecollect in interface FloatBagcollect in interface FloatIterablecollect in interface MutableFloatBagcollect in interface MutableFloatCollectioncollect in class AbstractSynchronizedFloatCollectionpublic boolean equals(java.lang.Object otherBag)
FloatBagBag.equals(Object).public int hashCode()
FloatBagBag.hashCode().public LazyFloatIterable asLazy()
FloatIterableasLazy in interface FloatIterableasLazy in class AbstractSynchronizedFloatCollectionpublic MutableFloatBag asUnmodifiable()
asUnmodifiable in interface MutableFloatBagasUnmodifiable in interface MutableFloatCollectionasUnmodifiable in class AbstractSynchronizedFloatCollectionpublic MutableFloatBag asSynchronized()
asSynchronized in interface MutableFloatBagasSynchronized in interface MutableFloatCollectionasSynchronized in class AbstractSynchronizedFloatCollectionpublic ImmutableFloatBag toImmutable()
MutableFloatBagtoImmutable in interface FloatBagtoImmutable in interface MutableFloatBagtoImmutable in interface MutableFloatCollectiontoImmutable in class AbstractSynchronizedFloatCollectionpublic MutableFloatBag newEmpty()
MutableFloatBagnewEmpty in interface MutableFloatBagnewEmpty in interface MutableFloatCollectionCopyright © 2004–2018. All rights reserved.