public class LongHashBag extends AbstractLongIterable implements 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(LongIterable iterable) |
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringselectDuplicates, taptoStringOfItemToCountasLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByappendString, appendString, makeString, makeString, makeString, toStringpublic LongHashBag()
public LongHashBag(int size)
public LongHashBag(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(LongIterable source)
public static LongHashBag newBag(LongBag source)
public boolean isEmpty()
isEmpty in interface PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface PrimitiveIterablepublic int size()
size in interface PrimitiveIterablepublic int sizeDistinct()
sizeDistinct in interface LongBagpublic void clear()
clear in interface MutableLongCollectionpublic LongHashBag with(long element)
with in interface MutableLongBagwith in interface MutableLongCollectionpublic LongHashBag with(long element1, long element2)
public LongHashBag with(long element1, long element2, long element3)
public LongHashBag withAll(LongIterable iterable)
withAll in interface MutableLongBagwithAll in interface MutableLongCollectionpublic LongHashBag without(long element)
without in interface MutableLongBagwithout in interface MutableLongCollectionpublic LongHashBag withoutAll(LongIterable iterable)
withoutAll in interface MutableLongBagwithoutAll in interface MutableLongCollectionpublic boolean contains(long value)
contains in interface LongIterablepublic int occurrencesOf(long item)
occurrencesOf in interface LongBagpublic void forEachWithOccurrences(LongIntProcedure procedure)
forEachWithOccurrences in interface LongBagpublic LongHashBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface LongBagselectByOccurrences in interface MutableLongBagpublic MutableLongSet selectUnique()
selectUnique in interface LongBagselectUnique in interface MutableLongBagpublic MutableList<LongIntPair> topOccurrences(int count)
topOccurrences in interface LongBagtopOccurrences in interface MutableLongBagpublic MutableList<LongIntPair> bottomOccurrences(int count)
bottomOccurrences in interface LongBagbottomOccurrences in interface MutableLongBagpublic boolean add(long item)
add in interface MutableLongCollectionpublic boolean remove(long item)
remove in interface MutableLongCollectionpublic boolean removeIf(LongPredicate predicate)
removeIf in interface MutableLongCollectionpublic boolean addAll(long... source)
addAll in interface MutableLongCollectionpublic boolean addAll(LongIterable source)
addAll in interface MutableLongCollectionpublic boolean removeAll(long... source)
removeAll in interface MutableLongCollectionpublic boolean removeAll(LongIterable source)
removeAll in interface MutableLongCollectionpublic boolean retainAll(LongIterable source)
retainAll in interface MutableLongCollectionpublic boolean retainAll(long... source)
retainAll in interface MutableLongCollectionpublic void addOccurrences(long item,
int occurrences)
addOccurrences in interface MutableLongBagpublic boolean removeOccurrences(long item,
int occurrences)
removeOccurrences in interface MutableLongBagpublic void each(LongProcedure procedure)
each in interface LongIterablepublic LongHashBag select(LongPredicate predicate)
select in interface LongBagselect in interface MutableLongBagselect in interface MutableLongCollectionselect in interface LongIterablepublic LongHashBag reject(LongPredicate predicate)
reject in interface LongBagreject in interface MutableLongBagreject in interface MutableLongCollectionreject in interface LongIterablepublic <T> T injectInto(T injectedValue,
ObjectLongToObjectFunction<? super T,? extends T> function)
injectInto in interface LongIterablepublic RichIterable<LongIterable> chunk(int size)
chunk in interface LongIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(LongPredicate predicate)
count in interface LongIterablepublic boolean anySatisfy(LongPredicate predicate)
anySatisfy in interface LongIterablepublic boolean allSatisfy(LongPredicate predicate)
allSatisfy in interface LongIterablepublic boolean noneSatisfy(LongPredicate predicate)
noneSatisfy in interface LongIterablepublic long detectIfNone(LongPredicate predicate, long ifNone)
detectIfNone in interface LongIterablepublic <V> MutableBag<V> collect(LongToObjectFunction<? extends V> function)
collect in interface LongBagcollect in interface MutableLongBagcollect in interface MutableLongCollectioncollect in interface LongIterablepublic long max()
max in interface LongIterablepublic long min()
min in interface LongIterablepublic long sum()
sum in interface LongIterablepublic long[] toArray()
toArray in interface LongIterablepublic long[] toArray(long[] array)
toArray in interface LongIterablepublic MutableLongBag asUnmodifiable()
asUnmodifiable in interface MutableLongBagasUnmodifiable in interface MutableLongCollectionpublic MutableLongBag asSynchronized()
asSynchronized in interface MutableLongBagasSynchronized in interface MutableLongCollectionpublic ImmutableLongBag toImmutable()
toImmutable in interface LongBagtoImmutable in interface MutableLongBagtoImmutable in interface MutableLongCollectionpublic LongHashBag newEmpty()
newEmpty in interface MutableLongBagnewEmpty in interface MutableLongCollectionpublic MutableLongIterator longIterator()
longIterator in interface MutableLongCollectionlongIterator in interface LongIterablepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionCopyright © 2004–2022. All rights reserved.