public class ShortHashBag extends AbstractShortIterable implements MutableShortBag, Externalizable
HashBag, and is memory-optimized for short primitives.
This file was automatically generated from template file primitiveHashBag.stg.| Constructor and Description |
|---|
ShortHashBag() |
ShortHashBag(int size) |
ShortHashBag(short... elements) |
ShortHashBag(ShortHashBag bag) |
ShortHashBag(ShortIterable 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 ShortHashBag()
public ShortHashBag(int size)
public ShortHashBag(ShortIterable iterable)
public ShortHashBag(short... elements)
public ShortHashBag(ShortHashBag bag)
public static ShortHashBag newBag(int size)
public static ShortHashBag newBagWith(short... source)
public static ShortHashBag newBag(ShortIterable source)
public static ShortHashBag newBag(ShortBag 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 ShortBagpublic void clear()
clear in interface MutableShortCollectionpublic ShortHashBag with(short element)
with in interface MutableShortBagwith in interface MutableShortCollectionpublic ShortHashBag with(short element1, short element2)
public ShortHashBag with(short element1, short element2, short element3)
public ShortHashBag withAll(ShortIterable iterable)
withAll in interface MutableShortBagwithAll in interface MutableShortCollectionpublic ShortHashBag without(short element)
without in interface MutableShortBagwithout in interface MutableShortCollectionpublic ShortHashBag withoutAll(ShortIterable iterable)
withoutAll in interface MutableShortBagwithoutAll in interface MutableShortCollectionpublic boolean contains(short value)
contains in interface ShortIterablepublic int occurrencesOf(short item)
occurrencesOf in interface ShortBagpublic void forEachWithOccurrences(ShortIntProcedure procedure)
forEachWithOccurrences in interface ShortBagpublic ShortHashBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface MutableShortBagselectByOccurrences in interface ShortBagpublic MutableShortSet selectUnique()
selectUnique in interface MutableShortBagselectUnique in interface ShortBagpublic MutableList<ShortIntPair> topOccurrences(int count)
topOccurrences in interface MutableShortBagtopOccurrences in interface ShortBagpublic MutableList<ShortIntPair> bottomOccurrences(int count)
bottomOccurrences in interface MutableShortBagbottomOccurrences in interface ShortBagpublic boolean add(short item)
add in interface MutableShortCollectionpublic boolean remove(short item)
remove in interface MutableShortCollectionpublic boolean removeIf(ShortPredicate predicate)
removeIf in interface MutableShortCollectionpublic boolean addAll(short... source)
addAll in interface MutableShortCollectionpublic boolean addAll(ShortIterable source)
addAll in interface MutableShortCollectionpublic boolean removeAll(short... source)
removeAll in interface MutableShortCollectionpublic boolean removeAll(ShortIterable source)
removeAll in interface MutableShortCollectionpublic boolean retainAll(ShortIterable source)
retainAll in interface MutableShortCollectionpublic boolean retainAll(short... source)
retainAll in interface MutableShortCollectionpublic void addOccurrences(short item,
int occurrences)
addOccurrences in interface MutableShortBagpublic boolean removeOccurrences(short item,
int occurrences)
removeOccurrences in interface MutableShortBagpublic void each(ShortProcedure procedure)
each in interface ShortIterablepublic ShortHashBag select(ShortPredicate predicate)
select in interface MutableShortBagselect in interface ShortBagselect in interface MutableShortCollectionselect in interface ShortIterablepublic ShortHashBag reject(ShortPredicate predicate)
reject in interface MutableShortBagreject in interface ShortBagreject in interface MutableShortCollectionreject in interface ShortIterablepublic <T> T injectInto(T injectedValue,
ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface ShortIterablepublic RichIterable<ShortIterable> chunk(int size)
chunk in interface ShortIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(ShortPredicate predicate)
count in interface ShortIterablepublic boolean anySatisfy(ShortPredicate predicate)
anySatisfy in interface ShortIterablepublic boolean allSatisfy(ShortPredicate predicate)
allSatisfy in interface ShortIterablepublic boolean noneSatisfy(ShortPredicate predicate)
noneSatisfy in interface ShortIterablepublic short detectIfNone(ShortPredicate predicate, short ifNone)
detectIfNone in interface ShortIterablepublic <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
collect in interface MutableShortBagcollect in interface ShortBagcollect in interface MutableShortCollectioncollect in interface ShortIterablepublic short max()
max in interface ShortIterablepublic short min()
min in interface ShortIterablepublic long sum()
sum in interface ShortIterablepublic short[] toArray()
toArray in interface ShortIterablepublic short[] toArray(short[] array)
toArray in interface ShortIterablepublic MutableShortBag asUnmodifiable()
asUnmodifiable in interface MutableShortBagasUnmodifiable in interface MutableShortCollectionpublic MutableShortBag asSynchronized()
asSynchronized in interface MutableShortBagasSynchronized in interface MutableShortCollectionpublic ImmutableShortBag toImmutable()
toImmutable in interface MutableShortBagtoImmutable in interface ShortBagtoImmutable in interface MutableShortCollectionpublic ShortHashBag newEmpty()
newEmpty in interface MutableShortBagnewEmpty in interface MutableShortCollectionpublic MutableShortIterator shortIterator()
shortIterator in interface MutableShortCollectionshortIterator in interface ShortIterablepublic 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.