@NotThreadSafe public final class UnmodifiableFloatBag extends AbstractUnmodifiableFloatCollection implements MutableFloatBag
Modifier and Type | Method and Description |
---|---|
void |
addOccurrences(float item,
int occurrences) |
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. |
UnmodifiableFloatBag |
with(float element) |
UnmodifiableFloatBag |
withAll(FloatIterable elements) |
UnmodifiableFloatBag |
without(float element) |
UnmodifiableFloatBag |
withoutAll(FloatIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, 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, asLazy, 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 UnmodifiableFloatBag with(float element)
with
in interface MutableFloatBag
with
in interface MutableFloatCollection
with
in class AbstractUnmodifiableFloatCollection
public UnmodifiableFloatBag without(float element)
without
in interface MutableFloatBag
without
in interface MutableFloatCollection
without
in class AbstractUnmodifiableFloatCollection
public UnmodifiableFloatBag withAll(FloatIterable elements)
withAll
in interface MutableFloatBag
withAll
in interface MutableFloatCollection
withAll
in class AbstractUnmodifiableFloatCollection
public UnmodifiableFloatBag withoutAll(FloatIterable elements)
withoutAll
in interface MutableFloatBag
withoutAll
in interface MutableFloatCollection
withoutAll
in class AbstractUnmodifiableFloatCollection
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 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 select(FloatPredicate predicate)
select
in interface FloatBag
select
in interface MutableFloatBag
select
in interface MutableFloatCollection
select
in interface FloatIterable
select
in class AbstractUnmodifiableFloatCollection
public MutableFloatBag reject(FloatPredicate predicate)
reject
in interface FloatBag
reject
in interface MutableFloatBag
reject
in interface MutableFloatCollection
reject
in interface FloatIterable
reject
in class AbstractUnmodifiableFloatCollection
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 AbstractUnmodifiableFloatCollection
public boolean equals(Object otherBag)
FloatBag
Bag.equals(Object)
.public int hashCode()
FloatBag
Bag.hashCode()
.public MutableFloatBag asUnmodifiable()
asUnmodifiable
in interface MutableFloatBag
asUnmodifiable
in interface MutableFloatCollection
asUnmodifiable
in class AbstractUnmodifiableFloatCollection
public MutableFloatBag asSynchronized()
asSynchronized
in interface MutableFloatBag
asSynchronized
in interface MutableFloatCollection
asSynchronized
in class AbstractUnmodifiableFloatCollection
public ImmutableFloatBag toImmutable()
MutableFloatBag
toImmutable
in interface FloatBag
toImmutable
in interface MutableFloatBag
toImmutable
in interface MutableFloatCollection
toImmutable
in class AbstractUnmodifiableFloatCollection
Copyright © 2004–2016. All rights reserved.