@NotThreadSafe public final class UnmodifiableLongBag extends AbstractUnmodifiableLongCollection implements MutableLongBag
| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(long item,
int occurrences) |
MutableLongBag |
asSynchronized() |
MutableLongBag |
asUnmodifiable() |
<V> MutableBag<V> |
collect(LongToObjectFunction<? extends V> function) |
boolean |
equals(Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(LongIntProcedure 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(long item)
The occurrences of a distinct item in the bag.
|
MutableLongBag |
reject(LongPredicate predicate) |
boolean |
removeOccurrences(long item,
int occurrences) |
MutableLongBag |
select(LongPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
ImmutableLongBag |
toImmutable()
Returns an immutable copy of this bag.
|
UnmodifiableLongBag |
with(long element) |
UnmodifiableLongBag |
withAll(LongIterable elements) |
UnmodifiableLongBag |
without(long element) |
UnmodifiableLongBag |
withoutAll(LongIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, clear, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, isEmpty, longIterator, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, retainAll, retainAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringadd, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, asLazy, average, contains, containsAll, containsAll, count, detectIfNone, each, forEach, injectInto, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListappendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toStringpublic UnmodifiableLongBag with(long element)
with in interface MutableLongBagwith in interface MutableLongCollectionwith in class AbstractUnmodifiableLongCollectionpublic UnmodifiableLongBag without(long element)
without in interface MutableLongBagwithout in interface MutableLongCollectionwithout in class AbstractUnmodifiableLongCollectionpublic UnmodifiableLongBag withAll(LongIterable elements)
withAll in interface MutableLongBagwithAll in interface MutableLongCollectionwithAll in class AbstractUnmodifiableLongCollectionpublic UnmodifiableLongBag withoutAll(LongIterable elements)
withoutAll in interface MutableLongBagwithoutAll in interface MutableLongCollectionwithoutAll in class AbstractUnmodifiableLongCollectionpublic void addOccurrences(long item,
int occurrences)
addOccurrences in interface MutableLongBagpublic boolean removeOccurrences(long item,
int occurrences)
removeOccurrences in interface MutableLongBagpublic int sizeDistinct()
LongBagsizeDistinct in interface LongBagpublic int occurrencesOf(long item)
LongBagoccurrencesOf in interface LongBagpublic void forEachWithOccurrences(LongIntProcedure procedure)
LongBagforEachWithOccurrences in interface LongBagpublic MutableLongBag select(LongPredicate predicate)
select in interface LongBagselect in interface MutableLongBagselect in interface MutableLongCollectionselect in interface LongIterableselect in class AbstractUnmodifiableLongCollectionpublic MutableLongBag reject(LongPredicate predicate)
reject in interface LongBagreject in interface MutableLongBagreject in interface MutableLongCollectionreject in interface LongIterablereject in class AbstractUnmodifiableLongCollectionpublic <V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
collect in interface LongBagcollect in interface MutableLongBagcollect in interface MutableLongCollectioncollect in interface LongIterablecollect in class AbstractUnmodifiableLongCollectionpublic boolean equals(Object otherBag)
LongBagBag.equals(Object).public int hashCode()
LongBagBag.hashCode().public MutableLongBag asUnmodifiable()
asUnmodifiable in interface MutableLongBagasUnmodifiable in interface MutableLongCollectionasUnmodifiable in class AbstractUnmodifiableLongCollectionpublic MutableLongBag asSynchronized()
asSynchronized in interface MutableLongBagasSynchronized in interface MutableLongCollectionasSynchronized in class AbstractUnmodifiableLongCollectionpublic ImmutableLongBag toImmutable()
MutableLongBagtoImmutable in interface LongBagtoImmutable in interface MutableLongBagtoImmutable in interface MutableLongCollectiontoImmutable in class AbstractUnmodifiableLongCollectionCopyright © 2004–2016. All rights reserved.