Class ShortHashBag
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractShortIterable
org.eclipse.collections.impl.bag.mutable.primitive.ShortHashBag
- All Implemented Interfaces:
Externalizable,Serializable,MutableShortBag,ShortBag,MutableShortCollection,PrimitiveIterable,ShortIterable
ShortHashBag is similar to
HashBag, and is memory-optimized for short primitives.
This file was automatically generated from template file primitiveHashBag.stg.- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionShortHashBag(int size) ShortHashBag(short... elements) ShortHashBag(ShortIterable iterable) ShortHashBag(ShortHashBag bag) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(short item) booleanaddAll(short... source) booleanaddAll(ShortIterable source) voidaddOccurrences(short item, int occurrences) booleanallSatisfy(ShortPredicate predicate) booleananySatisfy(ShortPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) bottomOccurrences(int count) chunk(int size) voidclear()<V> MutableBag<V>collect(ShortToObjectFunction<? extends V> function) booleancontains(short value) intcount(ShortPredicate predicate) shortdetectIfNone(ShortPredicate predicate, short ifNone) voideach(ShortProcedure procedure) booleanvoidforEachWithOccurrences(ShortIntProcedure procedure) inthashCode()<T> TinjectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) booleanisEmpty()shortmax()shortmin()static ShortHashBagnewBag(int size) static ShortHashBagstatic ShortHashBagnewBag(ShortIterable source) static ShortHashBagnewBagWith(short... source) newEmpty()Creates a new empty ShortHashBag.booleannoneSatisfy(ShortPredicate predicate) booleannotEmpty()intoccurrencesOf(short item) voidreject(ShortPredicate predicate) booleanremove(short item) booleanremoveAll(short... source) booleanremoveAll(ShortIterable source) booleanremoveIf(ShortPredicate predicate) booleanremoveOccurrences(short item, int occurrences) booleanretainAll(short... source) booleanretainAll(ShortIterable source) select(ShortPredicate predicate) selectByOccurrences(IntPredicate predicate) intsize()intlongsum()short[]toArray()short[]toArray(short[] array) topOccurrences(int count) with(short element) with(short element1, short element2) with(short element1, short element2, short element3) withAll(ShortIterable iterable) without(short element) withoutAll(ShortIterable iterable) voidMethods inherited from class org.eclipse.collections.impl.primitive.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringMethods inherited from interface org.eclipse.collections.api.bag.primitive.MutableShortBag
selectDuplicates, tapMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toStringMethods inherited from interface org.eclipse.collections.api.bag.primitive.ShortBag
toStringOfItemToCountMethods inherited from interface org.eclipse.collections.api.ShortIterable
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, toSortedListBy
-
Constructor Details
-
ShortHashBag
public ShortHashBag() -
ShortHashBag
public ShortHashBag(int size) -
ShortHashBag
-
ShortHashBag
public ShortHashBag(short... elements) -
ShortHashBag
-
-
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 interfaceShortBag
-
clear
public void clear()- Specified by:
clearin interfaceMutableShortCollection
-
with
- Specified by:
within interfaceMutableShortBag- Specified by:
within interfaceMutableShortCollection
-
with
-
with
-
withAll
- Specified by:
withAllin interfaceMutableShortBag- Specified by:
withAllin interfaceMutableShortCollection
-
without
- Specified by:
withoutin interfaceMutableShortBag- Specified by:
withoutin interfaceMutableShortCollection
-
withoutAll
- Specified by:
withoutAllin interfaceMutableShortBag- Specified by:
withoutAllin interfaceMutableShortCollection
-
contains
public boolean contains(short value) - Specified by:
containsin interfaceShortIterable
-
occurrencesOf
public int occurrencesOf(short item) - Specified by:
occurrencesOfin interfaceShortBag
-
forEachWithOccurrences
- Specified by:
forEachWithOccurrencesin interfaceShortBag
-
selectByOccurrences
- Specified by:
selectByOccurrencesin interfaceMutableShortBag- Specified by:
selectByOccurrencesin interfaceShortBag
-
selectUnique
- Specified by:
selectUniquein interfaceMutableShortBag- Specified by:
selectUniquein interfaceShortBag
-
topOccurrences
- Specified by:
topOccurrencesin interfaceMutableShortBag- Specified by:
topOccurrencesin interfaceShortBag
-
bottomOccurrences
- Specified by:
bottomOccurrencesin interfaceMutableShortBag- Specified by:
bottomOccurrencesin interfaceShortBag
-
add
public boolean add(short item) - Specified by:
addin interfaceMutableShortCollection
-
remove
public boolean remove(short item) - Specified by:
removein interfaceMutableShortCollection
-
removeIf
- Specified by:
removeIfin interfaceMutableShortCollection
-
addAll
public boolean addAll(short... source) - Specified by:
addAllin interfaceMutableShortCollection
-
addAll
- Specified by:
addAllin interfaceMutableShortCollection
-
removeAll
public boolean removeAll(short... source) - Specified by:
removeAllin interfaceMutableShortCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableShortCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableShortCollection
-
retainAll
public boolean retainAll(short... source) - Specified by:
retainAllin interfaceMutableShortCollection
-
addOccurrences
public void addOccurrences(short item, int occurrences) - Specified by:
addOccurrencesin interfaceMutableShortBag
-
removeOccurrences
public boolean removeOccurrences(short item, int occurrences) - Specified by:
removeOccurrencesin interfaceMutableShortBag
-
each
- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceMutableShortBag- Specified by:
selectin interfaceMutableShortCollection- Specified by:
selectin interfaceShortBag- Specified by:
selectin interfaceShortIterable
-
reject
- Specified by:
rejectin interfaceMutableShortBag- Specified by:
rejectin interfaceMutableShortCollection- Specified by:
rejectin interfaceShortBag- Specified by:
rejectin interfaceShortIterable
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceShortIterable
-
chunk
- Specified by:
chunkin interfaceShortIterable
-
equals
-
hashCode
public int hashCode() -
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
count
- Specified by:
countin interfaceShortIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceShortIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceShortIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceShortIterable
-
collect
- Specified by:
collectin interfaceMutableShortBag- Specified by:
collectin interfaceMutableShortCollection- Specified by:
collectin interfaceShortBag- Specified by:
collectin interfaceShortIterable
-
max
public short max()- Specified by:
maxin interfaceShortIterable
-
min
public short min()- Specified by:
minin interfaceShortIterable
-
sum
public long sum()- Specified by:
sumin interfaceShortIterable
-
toArray
public short[] toArray()- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] array) - Specified by:
toArrayin interfaceShortIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableShortBag- Specified by:
asUnmodifiablein interfaceMutableShortCollection
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableShortBag- Specified by:
asSynchronizedin interfaceMutableShortCollection
-
toImmutable
- Specified by:
toImmutablein interfaceMutableShortBag- Specified by:
toImmutablein interfaceMutableShortCollection- Specified by:
toImmutablein interfaceShortBag
-
newEmpty
Creates a new empty ShortHashBag.- Specified by:
newEmptyin interfaceMutableShortBag- Specified by:
newEmptyin interfaceMutableShortCollection- Since:
- 9.2.
-
shortIterator
- Specified by:
shortIteratorin interfaceMutableShortCollection- Specified by:
shortIteratorin interfaceShortIterable
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-