@NotThreadSafe public final class UnmodifiableLongBag extends AbstractUnmodifiableLongCollection implements com.gs.collections.api.bag.primitive.MutableLongBag
| Modifier and Type | Method and Description |
|---|---|
void |
addOccurrences(long item,
int occurrences) |
com.gs.collections.api.LazyLongIterable |
asLazy() |
com.gs.collections.api.bag.primitive.MutableLongBag |
asSynchronized() |
com.gs.collections.api.bag.primitive.MutableLongBag |
asUnmodifiable() |
<V> com.gs.collections.api.bag.MutableBag<V> |
collect(com.gs.collections.api.block.function.primitive.LongToObjectFunction<? extends V> function) |
boolean |
equals(java.lang.Object otherBag)
Follows the same general contract as
Bag.equals(Object). |
void |
forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.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.
|
com.gs.collections.api.bag.primitive.MutableLongBag |
reject(com.gs.collections.api.block.predicate.primitive.LongPredicate predicate) |
boolean |
removeOccurrences(long item,
int occurrences) |
com.gs.collections.api.bag.primitive.MutableLongBag |
select(com.gs.collections.api.block.predicate.primitive.LongPredicate predicate) |
int |
sizeDistinct()
The size of the Bag when counting only distinct elements.
|
com.gs.collections.api.bag.primitive.ImmutableLongBag |
toImmutable()
Returns an immutable copy of this bag.
|
UnmodifiableLongBag |
with(long element) |
UnmodifiableLongBag |
withAll(com.gs.collections.api.LongIterable elements) |
UnmodifiableLongBag |
without(long element) |
UnmodifiableLongBag |
withoutAll(com.gs.collections.api.LongIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, forEach, getLongCollection, isEmpty, longIterator, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, remove, removeAll, removeAll, size, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, clear, remove, removeAll, removeAllallSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, forEach, longIterator, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListpublic UnmodifiableLongBag with(long element)
with in interface com.gs.collections.api.bag.primitive.MutableLongBagwith in interface com.gs.collections.api.collection.primitive.MutableLongCollectionwith in class AbstractUnmodifiableLongCollectionpublic UnmodifiableLongBag without(long element)
without in interface com.gs.collections.api.bag.primitive.MutableLongBagwithout in interface com.gs.collections.api.collection.primitive.MutableLongCollectionwithout in class AbstractUnmodifiableLongCollectionpublic UnmodifiableLongBag withAll(com.gs.collections.api.LongIterable elements)
withAll in interface com.gs.collections.api.bag.primitive.MutableLongBagwithAll in interface com.gs.collections.api.collection.primitive.MutableLongCollectionwithAll in class AbstractUnmodifiableLongCollectionpublic UnmodifiableLongBag withoutAll(com.gs.collections.api.LongIterable elements)
withoutAll in interface com.gs.collections.api.bag.primitive.MutableLongBagwithoutAll in interface com.gs.collections.api.collection.primitive.MutableLongCollectionwithoutAll in class AbstractUnmodifiableLongCollectionpublic void addOccurrences(long item,
int occurrences)
addOccurrences in interface com.gs.collections.api.bag.primitive.MutableLongBagpublic boolean removeOccurrences(long item,
int occurrences)
removeOccurrences in interface com.gs.collections.api.bag.primitive.MutableLongBagpublic int sizeDistinct()
com.gs.collections.api.bag.primitive.LongBagsizeDistinct in interface com.gs.collections.api.bag.primitive.LongBagpublic int occurrencesOf(long item)
com.gs.collections.api.bag.primitive.LongBagoccurrencesOf in interface com.gs.collections.api.bag.primitive.LongBagpublic void forEachWithOccurrences(com.gs.collections.api.block.procedure.primitive.LongIntProcedure procedure)
com.gs.collections.api.bag.primitive.LongBagforEachWithOccurrences in interface com.gs.collections.api.bag.primitive.LongBagpublic com.gs.collections.api.bag.primitive.MutableLongBag select(com.gs.collections.api.block.predicate.primitive.LongPredicate predicate)
select in interface com.gs.collections.api.bag.primitive.LongBagselect in interface com.gs.collections.api.bag.primitive.MutableLongBagselect in interface com.gs.collections.api.collection.primitive.MutableLongCollectionselect in interface com.gs.collections.api.LongIterableselect in class AbstractUnmodifiableLongCollectionpublic com.gs.collections.api.bag.primitive.MutableLongBag reject(com.gs.collections.api.block.predicate.primitive.LongPredicate predicate)
reject in interface com.gs.collections.api.bag.primitive.LongBagreject in interface com.gs.collections.api.bag.primitive.MutableLongBagreject in interface com.gs.collections.api.collection.primitive.MutableLongCollectionreject in interface com.gs.collections.api.LongIterablereject in class AbstractUnmodifiableLongCollectionpublic <V> com.gs.collections.api.bag.MutableBag<V> collect(com.gs.collections.api.block.function.primitive.LongToObjectFunction<? extends V> function)
collect in interface com.gs.collections.api.bag.primitive.LongBagcollect in interface com.gs.collections.api.bag.primitive.MutableLongBagcollect in interface com.gs.collections.api.collection.primitive.MutableLongCollectioncollect in interface com.gs.collections.api.LongIterablecollect in class AbstractUnmodifiableLongCollectionpublic boolean equals(java.lang.Object otherBag)
com.gs.collections.api.bag.primitive.LongBagBag.equals(Object).equals in interface com.gs.collections.api.bag.primitive.LongBagequals in class java.lang.Objectpublic int hashCode()
com.gs.collections.api.bag.primitive.LongBagBag.hashCode().hashCode in interface com.gs.collections.api.bag.primitive.LongBaghashCode in class java.lang.Objectpublic com.gs.collections.api.LazyLongIterable asLazy()
asLazy in interface com.gs.collections.api.LongIterableasLazy in class AbstractUnmodifiableLongCollectionpublic com.gs.collections.api.bag.primitive.MutableLongBag asUnmodifiable()
asUnmodifiable in interface com.gs.collections.api.bag.primitive.MutableLongBagasUnmodifiable in interface com.gs.collections.api.collection.primitive.MutableLongCollectionasUnmodifiable in class AbstractUnmodifiableLongCollectionpublic com.gs.collections.api.bag.primitive.MutableLongBag asSynchronized()
asSynchronized in interface com.gs.collections.api.bag.primitive.MutableLongBagasSynchronized in interface com.gs.collections.api.collection.primitive.MutableLongCollectionasSynchronized in class AbstractUnmodifiableLongCollectionpublic com.gs.collections.api.bag.primitive.ImmutableLongBag toImmutable()
com.gs.collections.api.bag.primitive.MutableLongBagtoImmutable in interface com.gs.collections.api.bag.primitive.LongBagtoImmutable in interface com.gs.collections.api.bag.primitive.MutableLongBagtoImmutable in interface com.gs.collections.api.collection.primitive.MutableLongCollectiontoImmutable in class AbstractUnmodifiableLongCollection