@ThreadSafe public final class SynchronizedLongBag extends AbstractSynchronizedLongCollection implements com.gs.collections.api.bag.primitive.MutableLongBag
MutableLongBag. It is imperative that the user manually synchronize on the collection when iterating over it using the
LongIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveBag.stg.
MutableLongBag.asSynchronized(),
MutableBag.asSynchronized(),
Serialized Form| 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(). |
<T> T |
injectInto(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectLongToObjectFunction<? super T,? extends T> function) |
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.
|
SynchronizedLongBag |
with(long element) |
SynchronizedLongBag |
withAll(com.gs.collections.api.LongIterable elements) |
SynchronizedLongBag |
without(long element) |
SynchronizedLongBag |
withoutAll(com.gs.collections.api.LongIterable elements) |
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, average, clear, contains, containsAll, containsAll, count, detectIfNone, forEach, getLock, getLongCollection, 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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, addAll, addAll, clear, remove, removeAll, removeAll, retainAll, retainAllallSatisfy, anySatisfy, average, contains, containsAll, containsAll, count, detectIfNone, forEach, longIterator, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, sum, toArray, toBag, toList, toSet, toSortedArray, toSortedListpublic SynchronizedLongBag with(long element)
with in interface com.gs.collections.api.bag.primitive.MutableLongBagwith in interface com.gs.collections.api.collection.primitive.MutableLongCollectionwith in class AbstractSynchronizedLongCollectionpublic SynchronizedLongBag without(long element)
without in interface com.gs.collections.api.bag.primitive.MutableLongBagwithout in interface com.gs.collections.api.collection.primitive.MutableLongCollectionwithout in class AbstractSynchronizedLongCollectionpublic SynchronizedLongBag 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 AbstractSynchronizedLongCollectionpublic SynchronizedLongBag 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 AbstractSynchronizedLongCollectionpublic 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 AbstractSynchronizedLongCollectionpublic 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 AbstractSynchronizedLongCollectionpublic <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 AbstractSynchronizedLongCollectionpublic 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 AbstractSynchronizedLongCollectionpublic 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 AbstractSynchronizedLongCollectionpublic 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 AbstractSynchronizedLongCollectionpublic 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 AbstractSynchronizedLongCollectionpublic <T> T injectInto(T injectedValue,
com.gs.collections.api.block.function.primitive.ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface com.gs.collections.api.LongIterableinjectInto in class AbstractSynchronizedLongCollection