@NotThreadSafe public final class UnmodifiableShortBag extends AbstractUnmodifiableShortCollection implements MutableShortBag
Modifier and Type | Method and Description |
---|---|
void |
addOccurrences(short item,
int occurrences) |
MutableShortBag |
asSynchronized() |
MutableShortBag |
asUnmodifiable() |
<V> MutableBag<V> |
collect(ShortToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object) . |
void |
forEachWithOccurrences(ShortIntProcedure 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(short item)
The occurrences of a distinct item in the bag.
|
MutableShortBag |
reject(ShortPredicate predicate) |
boolean |
removeOccurrences(short item,
int occurrences) |
MutableShortBag |
select(ShortPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableShortBag |
toImmutable()
Returns an immutable copy of this bag.
|
UnmodifiableShortBag |
with(short element) |
UnmodifiableShortBag |
withAll(ShortIterable elements) |
UnmodifiableShortBag |
without(short element) |
UnmodifiableShortBag |
withoutAll(ShortIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, isEmpty, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, shortIterator, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
add, addAll, addAll, clear, remove, removeAll, removeAll, retainAll, retainAll, shortIterator
allSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
public UnmodifiableShortBag with(short element)
with
in interface MutableShortBag
with
in interface MutableShortCollection
with
in class AbstractUnmodifiableShortCollection
public UnmodifiableShortBag without(short element)
without
in interface MutableShortBag
without
in interface MutableShortCollection
without
in class AbstractUnmodifiableShortCollection
public UnmodifiableShortBag withAll(ShortIterable elements)
withAll
in interface MutableShortBag
withAll
in interface MutableShortCollection
withAll
in class AbstractUnmodifiableShortCollection
public UnmodifiableShortBag withoutAll(ShortIterable elements)
withoutAll
in interface MutableShortBag
withoutAll
in interface MutableShortCollection
withoutAll
in class AbstractUnmodifiableShortCollection
public void addOccurrences(short item, int occurrences)
addOccurrences
in interface MutableShortBag
public boolean removeOccurrences(short item, int occurrences)
removeOccurrences
in interface MutableShortBag
public int sizeDistinct()
ShortBag
sizeDistinct
in interface ShortBag
public int occurrencesOf(short item)
ShortBag
occurrencesOf
in interface ShortBag
public void forEachWithOccurrences(ShortIntProcedure procedure)
ShortBag
forEachWithOccurrences
in interface ShortBag
public MutableShortBag select(ShortPredicate predicate)
select
in interface MutableShortBag
select
in interface ShortBag
select
in interface MutableShortCollection
select
in interface ShortIterable
select
in class AbstractUnmodifiableShortCollection
public MutableShortBag reject(ShortPredicate predicate)
reject
in interface MutableShortBag
reject
in interface ShortBag
reject
in interface MutableShortCollection
reject
in interface ShortIterable
reject
in class AbstractUnmodifiableShortCollection
public <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
collect
in interface MutableShortBag
collect
in interface ShortBag
collect
in interface MutableShortCollection
collect
in interface ShortIterable
collect
in class AbstractUnmodifiableShortCollection
public boolean equals(Object otherBag)
ShortBag
Bag.equals(Object)
.public int hashCode()
ShortBag
Bag.hashCode()
.public MutableShortBag asUnmodifiable()
asUnmodifiable
in interface MutableShortBag
asUnmodifiable
in interface MutableShortCollection
asUnmodifiable
in class AbstractUnmodifiableShortCollection
public MutableShortBag asSynchronized()
asSynchronized
in interface MutableShortBag
asSynchronized
in interface MutableShortCollection
asSynchronized
in class AbstractUnmodifiableShortCollection
public ImmutableShortBag toImmutable()
MutableShortBag
toImmutable
in interface MutableShortBag
toImmutable
in interface ShortBag
toImmutable
in interface MutableShortCollection
toImmutable
in class AbstractUnmodifiableShortCollection
Copyright © 2004–2016. All rights reserved.