public class ByteHashBag extends AbstractByteIterable implements MutableByteBag, Externalizable
HashBag, and is memory-optimized for byte primitives.
This file was automatically generated from template file primitiveHashBag.stg.| Constructor and Description |
|---|
ByteHashBag() |
ByteHashBag(byte... elements) |
ByteHashBag(ByteHashBag bag) |
ByteHashBag(ByteIterable iterable) |
ByteHashBag(int size) |
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 ByteHashBag()
public ByteHashBag(int size)
public ByteHashBag(ByteIterable iterable)
public ByteHashBag(byte... elements)
public ByteHashBag(ByteHashBag bag)
public static ByteHashBag newBag(int size)
public static ByteHashBag newBagWith(byte... source)
public static ByteHashBag newBag(ByteIterable source)
public static ByteHashBag newBag(ByteBag 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 ByteBagpublic void clear()
clear in interface MutableByteCollectionpublic ByteHashBag with(byte element)
with in interface MutableByteBagwith in interface MutableByteCollectionpublic ByteHashBag with(byte element1, byte element2)
public ByteHashBag with(byte element1, byte element2, byte element3)
public ByteHashBag withAll(ByteIterable iterable)
withAll in interface MutableByteBagwithAll in interface MutableByteCollectionpublic ByteHashBag without(byte element)
without in interface MutableByteBagwithout in interface MutableByteCollectionpublic ByteHashBag withoutAll(ByteIterable iterable)
withoutAll in interface MutableByteBagwithoutAll in interface MutableByteCollectionpublic boolean contains(byte value)
contains in interface ByteIterablepublic int occurrencesOf(byte item)
occurrencesOf in interface ByteBagpublic void forEachWithOccurrences(ByteIntProcedure procedure)
forEachWithOccurrences in interface ByteBagpublic ByteHashBag selectByOccurrences(IntPredicate predicate)
selectByOccurrences in interface ByteBagselectByOccurrences in interface MutableByteBagpublic MutableByteSet selectUnique()
selectUnique in interface ByteBagselectUnique in interface MutableByteBagpublic MutableList<ByteIntPair> topOccurrences(int count)
topOccurrences in interface ByteBagtopOccurrences in interface MutableByteBagpublic MutableList<ByteIntPair> bottomOccurrences(int count)
bottomOccurrences in interface ByteBagbottomOccurrences in interface MutableByteBagpublic boolean add(byte item)
add in interface MutableByteCollectionpublic boolean remove(byte item)
remove in interface MutableByteCollectionpublic boolean removeIf(BytePredicate predicate)
removeIf in interface MutableByteCollectionpublic boolean addAll(byte... source)
addAll in interface MutableByteCollectionpublic boolean addAll(ByteIterable source)
addAll in interface MutableByteCollectionpublic boolean removeAll(byte... source)
removeAll in interface MutableByteCollectionpublic boolean removeAll(ByteIterable source)
removeAll in interface MutableByteCollectionpublic boolean retainAll(ByteIterable source)
retainAll in interface MutableByteCollectionpublic boolean retainAll(byte... source)
retainAll in interface MutableByteCollectionpublic void addOccurrences(byte item,
int occurrences)
addOccurrences in interface MutableByteBagpublic boolean removeOccurrences(byte item,
int occurrences)
removeOccurrences in interface MutableByteBagpublic void each(ByteProcedure procedure)
each in interface ByteIterablepublic ByteHashBag select(BytePredicate predicate)
select in interface ByteBagselect in interface MutableByteBagselect in interface ByteIterableselect in interface MutableByteCollectionpublic ByteHashBag reject(BytePredicate predicate)
reject in interface ByteBagreject in interface MutableByteBagreject in interface ByteIterablereject in interface MutableByteCollectionpublic <T> T injectInto(T injectedValue,
ObjectByteToObjectFunction<? super T,? extends T> function)
injectInto in interface ByteIterablepublic RichIterable<ByteIterable> chunk(int size)
chunk in interface ByteIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface PrimitiveIterablepublic int count(BytePredicate predicate)
count in interface ByteIterablepublic boolean anySatisfy(BytePredicate predicate)
anySatisfy in interface ByteIterablepublic boolean allSatisfy(BytePredicate predicate)
allSatisfy in interface ByteIterablepublic boolean noneSatisfy(BytePredicate predicate)
noneSatisfy in interface ByteIterablepublic byte detectIfNone(BytePredicate predicate, byte ifNone)
detectIfNone in interface ByteIterablepublic <V> MutableBag<V> collect(ByteToObjectFunction<? extends V> function)
collect in interface ByteBagcollect in interface MutableByteBagcollect in interface ByteIterablecollect in interface MutableByteCollectionpublic byte max()
max in interface ByteIterablepublic byte min()
min in interface ByteIterablepublic long sum()
sum in interface ByteIterablepublic byte[] toArray()
toArray in interface ByteIterablepublic byte[] toArray(byte[] array)
toArray in interface ByteIterablepublic MutableByteBag asUnmodifiable()
asUnmodifiable in interface MutableByteBagasUnmodifiable in interface MutableByteCollectionpublic MutableByteBag asSynchronized()
asSynchronized in interface MutableByteBagasSynchronized in interface MutableByteCollectionpublic ImmutableByteBag toImmutable()
toImmutable in interface ByteBagtoImmutable in interface MutableByteBagtoImmutable in interface MutableByteCollectionpublic ByteHashBag newEmpty()
newEmpty in interface MutableByteBagnewEmpty in interface MutableByteCollectionpublic MutableByteIterator byteIterator()
byteIterator in interface ByteIterablebyteIterator in interface MutableByteCollectionpublic 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.