@NotThreadSafe public final class LongHashBag extends AbstractLongIterable implements org.eclipse.collections.api.bag.primitive.MutableLongBag, Externalizable
HashBag, and is memory-optimized for long primitives.
This file was automatically generated from template file primitiveHashBag.stg.| Constructor and Description |
|---|
LongHashBag() |
LongHashBag(int size) |
LongHashBag(long... elements) |
LongHashBag(LongHashBag bag) |
LongHashBag(org.eclipse.collections.api.LongIterable iterable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(long item) |
boolean |
addAll(long... source) |
boolean |
addAll(org.eclipse.collections.api.LongIterable source) |
void |
addOccurrences(long item,
int occurrences) |
boolean |
allSatisfy(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate) |
boolean |
anySatisfy(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
org.eclipse.collections.api.bag.primitive.MutableLongBag |
asSynchronized() |
org.eclipse.collections.api.bag.primitive.MutableLongBag |
asUnmodifiable() |
void |
clear() |
<V> org.eclipse.collections.api.bag.MutableBag<V> |
collect(org.eclipse.collections.api.block.function.primitive.LongToObjectFunction<? extends V> function) |
boolean |
contains(long value) |
int |
count(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate) |
long |
detectIfNone(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate,
long ifNone) |
void |
each(org.eclipse.collections.api.block.procedure.primitive.LongProcedure procedure) |
boolean |
equals(Object otherBag) |
void |
forEach(org.eclipse.collections.api.block.procedure.primitive.LongProcedure procedure) |
void |
forEachWithOccurrences(org.eclipse.collections.api.block.procedure.primitive.LongIntProcedure procedure) |
int |
hashCode() |
<T> T |
injectInto(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectLongToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty() |
org.eclipse.collections.api.iterator.MutableLongIterator |
longIterator() |
long |
max() |
long |
min() |
static LongHashBag |
newBag(int size) |
static LongHashBag |
newBag(org.eclipse.collections.api.bag.primitive.LongBag source) |
static LongHashBag |
newBag(org.eclipse.collections.api.LongIterable source) |
static LongHashBag |
newBagWith(long... source) |
boolean |
noneSatisfy(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate) |
boolean |
notEmpty() |
int |
occurrencesOf(long item) |
void |
readExternal(ObjectInput in) |
LongHashBag |
reject(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate) |
boolean |
remove(long item) |
boolean |
removeAll(long... source) |
boolean |
removeAll(org.eclipse.collections.api.LongIterable source) |
boolean |
removeOccurrences(long item,
int occurrences) |
boolean |
retainAll(long... source) |
boolean |
retainAll(org.eclipse.collections.api.LongIterable source) |
LongHashBag |
select(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate) |
int |
size() |
int |
sizeDistinct() |
long |
sum() |
long[] |
toArray() |
org.eclipse.collections.api.bag.primitive.ImmutableLongBag |
toImmutable() |
LongHashBag |
with(long element) |
LongHashBag |
with(long element1,
long element2) |
LongHashBag |
with(long element1,
long element2,
long element3) |
LongHashBag |
withAll(org.eclipse.collections.api.LongIterable iterable) |
LongHashBag |
without(long element) |
LongHashBag |
withoutAll(org.eclipse.collections.api.LongIterable iterable) |
void |
writeExternal(ObjectOutput out) |
appendString, appendString, asLazy, average, containsAll, containsAll, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringpublic LongHashBag()
public LongHashBag(int size)
public LongHashBag(org.eclipse.collections.api.LongIterable iterable)
public LongHashBag(long... elements)
public LongHashBag(LongHashBag bag)
public static LongHashBag newBag(int size)
public static LongHashBag newBagWith(long... source)
public static LongHashBag newBag(org.eclipse.collections.api.LongIterable source)
public static LongHashBag newBag(org.eclipse.collections.api.bag.primitive.LongBag source)
public boolean isEmpty()
isEmpty in interface org.eclipse.collections.api.PrimitiveIterableisEmpty in class AbstractLongIterablepublic boolean notEmpty()
notEmpty in interface org.eclipse.collections.api.PrimitiveIterablenotEmpty in class AbstractLongIterablepublic int size()
size in interface org.eclipse.collections.api.PrimitiveIterablepublic int sizeDistinct()
sizeDistinct in interface org.eclipse.collections.api.bag.primitive.LongBagpublic void clear()
clear in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic LongHashBag with(long element)
with in interface org.eclipse.collections.api.bag.primitive.MutableLongBagwith in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic LongHashBag with(long element1, long element2)
public LongHashBag with(long element1, long element2, long element3)
public LongHashBag withAll(org.eclipse.collections.api.LongIterable iterable)
withAll in interface org.eclipse.collections.api.bag.primitive.MutableLongBagwithAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic LongHashBag without(long element)
without in interface org.eclipse.collections.api.bag.primitive.MutableLongBagwithout in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic LongHashBag withoutAll(org.eclipse.collections.api.LongIterable iterable)
withoutAll in interface org.eclipse.collections.api.bag.primitive.MutableLongBagwithoutAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean contains(long value)
contains in interface org.eclipse.collections.api.LongIterablepublic int occurrencesOf(long item)
occurrencesOf in interface org.eclipse.collections.api.bag.primitive.LongBagpublic void forEachWithOccurrences(org.eclipse.collections.api.block.procedure.primitive.LongIntProcedure procedure)
forEachWithOccurrences in interface org.eclipse.collections.api.bag.primitive.LongBagpublic boolean add(long item)
add in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean remove(long item)
remove in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean addAll(long... source)
addAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean addAll(org.eclipse.collections.api.LongIterable source)
addAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean removeAll(long... source)
removeAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean removeAll(org.eclipse.collections.api.LongIterable source)
removeAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean retainAll(org.eclipse.collections.api.LongIterable source)
retainAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic boolean retainAll(long... source)
retainAll in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic void addOccurrences(long item,
int occurrences)
addOccurrences in interface org.eclipse.collections.api.bag.primitive.MutableLongBagpublic boolean removeOccurrences(long item,
int occurrences)
removeOccurrences in interface org.eclipse.collections.api.bag.primitive.MutableLongBagpublic void forEach(org.eclipse.collections.api.block.procedure.primitive.LongProcedure procedure)
forEach in interface org.eclipse.collections.api.LongIterablepublic void each(org.eclipse.collections.api.block.procedure.primitive.LongProcedure procedure)
each in interface org.eclipse.collections.api.LongIterablepublic LongHashBag select(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate)
select in interface org.eclipse.collections.api.bag.primitive.LongBagselect in interface org.eclipse.collections.api.bag.primitive.MutableLongBagselect in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionselect in interface org.eclipse.collections.api.LongIterablepublic LongHashBag reject(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate)
reject in interface org.eclipse.collections.api.bag.primitive.LongBagreject in interface org.eclipse.collections.api.bag.primitive.MutableLongBagreject in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionreject in interface org.eclipse.collections.api.LongIterablepublic <T> T injectInto(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface org.eclipse.collections.api.LongIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface org.eclipse.collections.api.PrimitiveIterablepublic int count(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate)
count in interface org.eclipse.collections.api.LongIterablepublic boolean anySatisfy(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate)
anySatisfy in interface org.eclipse.collections.api.LongIterablepublic boolean allSatisfy(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate)
allSatisfy in interface org.eclipse.collections.api.LongIterablepublic boolean noneSatisfy(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate)
noneSatisfy in interface org.eclipse.collections.api.LongIterablepublic long detectIfNone(org.eclipse.collections.api.block.predicate.primitive.LongPredicate predicate,
long ifNone)
detectIfNone in interface org.eclipse.collections.api.LongIterablepublic <V> org.eclipse.collections.api.bag.MutableBag<V> collect(org.eclipse.collections.api.block.function.primitive.LongToObjectFunction<? extends V> function)
collect in interface org.eclipse.collections.api.bag.primitive.LongBagcollect in interface org.eclipse.collections.api.bag.primitive.MutableLongBagcollect in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectioncollect in interface org.eclipse.collections.api.LongIterablepublic long max()
max in interface org.eclipse.collections.api.LongIterablepublic long min()
min in interface org.eclipse.collections.api.LongIterablepublic long sum()
sum in interface org.eclipse.collections.api.LongIterablepublic long[] toArray()
toArray in interface org.eclipse.collections.api.LongIterablepublic org.eclipse.collections.api.bag.primitive.MutableLongBag asUnmodifiable()
asUnmodifiable in interface org.eclipse.collections.api.bag.primitive.MutableLongBagasUnmodifiable in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic org.eclipse.collections.api.bag.primitive.MutableLongBag asSynchronized()
asSynchronized in interface org.eclipse.collections.api.bag.primitive.MutableLongBagasSynchronized in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic org.eclipse.collections.api.bag.primitive.ImmutableLongBag toImmutable()
toImmutable in interface org.eclipse.collections.api.bag.primitive.LongBagtoImmutable in interface org.eclipse.collections.api.bag.primitive.MutableLongBagtoImmutable in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionpublic org.eclipse.collections.api.iterator.MutableLongIterator longIterator()
longIterator in interface org.eclipse.collections.api.collection.primitive.MutableLongCollectionlongIterator in interface org.eclipse.collections.api.LongIterablepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionCopyright © 2004–2017. All rights reserved.