Class ByteHashBag
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractByteIterable
org.eclipse.collections.impl.bag.mutable.primitive.ByteHashBag
- All Implemented Interfaces:
Externalizable,Serializable,ByteBag,MutableByteBag,ByteIterable,MutableByteCollection,PrimitiveIterable
ByteHashBag is similar to
HashBag, and is memory-optimized for byte primitives.
This file was automatically generated from template file primitiveHashBag.stg.- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionByteHashBag(byte... elements) ByteHashBag(int size) ByteHashBag(ByteIterable iterable) ByteHashBag(ByteHashBag bag) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(byte item) booleanaddAll(byte... source) booleanaddAll(ByteIterable source) voidaddOccurrences(byte item, int occurrences) booleanallSatisfy(BytePredicate predicate) booleananySatisfy(BytePredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) bottomOccurrences(int count) chunk(int size) voidclear()<V> MutableBag<V>collect(ByteToObjectFunction<? extends V> function) booleancontains(byte value) intcount(BytePredicate predicate) bytedetectIfNone(BytePredicate predicate, byte ifNone) voideach(ByteProcedure procedure) booleanvoidforEachWithOccurrences(ByteIntProcedure procedure) inthashCode()<T> TinjectInto(T injectedValue, ObjectByteToObjectFunction<? super T, ? extends T> function) booleanisEmpty()bytemax()bytemin()static ByteHashBagnewBag(int size) static ByteHashBagstatic ByteHashBagnewBag(ByteIterable source) static ByteHashBagnewBagWith(byte... source) newEmpty()Creates a new empty ByteHashBag.booleannoneSatisfy(BytePredicate predicate) booleannotEmpty()intoccurrencesOf(byte item) voidreject(BytePredicate predicate) booleanremove(byte item) booleanremoveAll(byte... source) booleanremoveAll(ByteIterable source) booleanremoveIf(BytePredicate predicate) booleanremoveOccurrences(byte item, int occurrences) booleanretainAll(byte... source) booleanretainAll(ByteIterable source) select(BytePredicate predicate) selectByOccurrences(IntPredicate predicate) intsize()intlongsum()byte[]toArray()byte[]toArray(byte[] array) topOccurrences(int count) with(byte element) with(byte element1, byte element2) with(byte element1, byte element2, byte element3) withAll(ByteIterable iterable) without(byte element) withoutAll(ByteIterable iterable) voidMethods inherited from class org.eclipse.collections.impl.primitive.AbstractByteIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.bag.primitive.ByteBag
toStringOfItemToCountMethods inherited from interface org.eclipse.collections.api.ByteIterable
asLazy, 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, toSortedListByMethods inherited from interface org.eclipse.collections.api.bag.primitive.MutableByteBag
selectDuplicates, tapMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Constructor Details
-
ByteHashBag
public ByteHashBag() -
ByteHashBag
public ByteHashBag(int size) -
ByteHashBag
-
ByteHashBag
public ByteHashBag(byte... elements) -
ByteHashBag
-
-
Method Details
-
newBag
-
newBagWith
-
newBag
-
newBag
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
sizeDistinct
public int sizeDistinct()- Specified by:
sizeDistinctin interfaceByteBag
-
clear
public void clear()- Specified by:
clearin interfaceMutableByteCollection
-
with
- Specified by:
within interfaceMutableByteBag- Specified by:
within interfaceMutableByteCollection
-
with
-
with
-
withAll
- Specified by:
withAllin interfaceMutableByteBag- Specified by:
withAllin interfaceMutableByteCollection
-
without
- Specified by:
withoutin interfaceMutableByteBag- Specified by:
withoutin interfaceMutableByteCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableByteBag- Specified by:
withoutAllin interfaceMutableByteCollection
-
contains
public boolean contains(byte value) - Specified by:
containsin interfaceByteIterable
-
occurrencesOf
public int occurrencesOf(byte item) - Specified by:
occurrencesOfin interfaceByteBag
-
forEachWithOccurrences
- Specified by:
forEachWithOccurrencesin interfaceByteBag
-
selectByOccurrences
- Specified by:
selectByOccurrencesin interfaceByteBag- Specified by:
selectByOccurrencesin interfaceMutableByteBag
-
selectUnique
- Specified by:
selectUniquein interfaceByteBag- Specified by:
selectUniquein interfaceMutableByteBag
-
topOccurrences
- Specified by:
topOccurrencesin interfaceByteBag- Specified by:
topOccurrencesin interfaceMutableByteBag
-
bottomOccurrences
- Specified by:
bottomOccurrencesin interfaceByteBag- Specified by:
bottomOccurrencesin interfaceMutableByteBag
-
add
public boolean add(byte item) - Specified by:
addin interfaceMutableByteCollection
-
remove
public boolean remove(byte item) - Specified by:
removein interfaceMutableByteCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableByteCollection
-
addAll
public boolean addAll(byte... source) - Specified by:
addAllin interfaceMutableByteCollection
-
addAll
- Specified by:
addAllin interfaceMutableByteCollection
-
removeAll
public boolean removeAll(byte... source) - Specified by:
removeAllin interfaceMutableByteCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableByteCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableByteCollection
-
retainAll
public boolean retainAll(byte... source) - Specified by:
retainAllin interfaceMutableByteCollection
-
addOccurrences
public void addOccurrences(byte item, int occurrences) - Specified by:
addOccurrencesin interfaceMutableByteBag
-
removeOccurrences
public boolean removeOccurrences(byte item, int occurrences) - Specified by:
removeOccurrencesin interfaceMutableByteBag
-
each
- Specified by:
eachin interfaceByteIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceByteBag- Specified by:
selectin interfaceByteIterable- Specified by:
selectin interfaceMutableByteBag- Specified by:
selectin interfaceMutableByteCollection
-
reject
- Specified by:
rejectin interfaceByteBag- Specified by:
rejectin interfaceByteIterable- Specified by:
rejectin interfaceMutableByteBag- Specified by:
rejectin interfaceMutableByteCollection
-
injectInto
public <T> T injectInto(T injectedValue, ObjectByteToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceByteIterable
-
chunk
- Specified by:
chunkin interfaceByteIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
count
- Specified by:
countin interfaceByteIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceByteIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceByteIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceByteIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceByteIterable
-
collect
- Specified by:
collectin interfaceByteBag- Specified by:
collectin interfaceByteIterable- Specified by:
collectin interfaceMutableByteBag- Specified by:
collectin interfaceMutableByteCollection
-
max
public byte max()- Specified by:
maxin interfaceByteIterable
-
min
public byte min()- Specified by:
minin interfaceByteIterable
-
sum
public long sum()- Specified by:
sumin interfaceByteIterable
-
toArray
public byte[] toArray()- Specified by:
toArrayin interfaceByteIterable
-
toArray
public byte[] toArray(byte[] array) - Specified by:
toArrayin interfaceByteIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableByteBag- Specified by:
asUnmodifiablein interfaceMutableByteCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableByteBag- Specified by:
asSynchronizedin interfaceMutableByteCollection
-
toImmutable
- Specified by:
toImmutablein interfaceByteBag- Specified by:
toImmutablein interfaceMutableByteBag- Specified by:
toImmutablein interfaceMutableByteCollection
-
newEmpty
Creates a new empty ByteHashBag.- Specified by:
newEmptyin interfaceMutableByteBag- Specified by:
newEmptyin interfaceMutableByteCollection- Since:
- 9.2.
-
byteIterator
- Specified by:
byteIteratorin interfaceByteIterable- Specified by:
byteIteratorin interfaceMutableByteCollection
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-