@NotThreadSafe public final class ShortHashBag extends AbstractShortIterable implements org.eclipse.collections.api.bag.primitive.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(org.eclipse.collections.api.ShortIterable iterable) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(short item) |
boolean |
addAll(short... source) |
boolean |
addAll(org.eclipse.collections.api.ShortIterable source) |
void |
addOccurrences(short item,
int occurrences) |
boolean |
allSatisfy(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate) |
boolean |
anySatisfy(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
org.eclipse.collections.api.bag.primitive.MutableShortBag |
asSynchronized() |
org.eclipse.collections.api.bag.primitive.MutableShortBag |
asUnmodifiable() |
void |
clear() |
<V> org.eclipse.collections.api.bag.MutableBag<V> |
collect(org.eclipse.collections.api.block.function.primitive.ShortToObjectFunction<? extends V> function) |
boolean |
contains(short value) |
int |
count(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate) |
short |
detectIfNone(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate,
short ifNone) |
void |
each(org.eclipse.collections.api.block.procedure.primitive.ShortProcedure procedure) |
boolean |
equals(Object otherBag) |
void |
forEach(org.eclipse.collections.api.block.procedure.primitive.ShortProcedure procedure) |
void |
forEachWithOccurrences(org.eclipse.collections.api.block.procedure.primitive.ShortIntProcedure procedure) |
int |
hashCode() |
<T> T |
injectInto(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectShortToObjectFunction<? super T,? extends T> function) |
boolean |
isEmpty() |
short |
max() |
short |
min() |
static ShortHashBag |
newBag(int size) |
static ShortHashBag |
newBag(org.eclipse.collections.api.bag.primitive.ShortBag source) |
static ShortHashBag |
newBag(org.eclipse.collections.api.ShortIterable source) |
static ShortHashBag |
newBagWith(short... source) |
boolean |
noneSatisfy(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate) |
boolean |
notEmpty() |
int |
occurrencesOf(short item) |
void |
readExternal(ObjectInput in) |
ShortHashBag |
reject(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate) |
boolean |
remove(short item) |
boolean |
removeAll(short... source) |
boolean |
removeAll(org.eclipse.collections.api.ShortIterable source) |
boolean |
removeOccurrences(short item,
int occurrences) |
boolean |
retainAll(short... source) |
boolean |
retainAll(org.eclipse.collections.api.ShortIterable source) |
ShortHashBag |
select(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate) |
org.eclipse.collections.api.iterator.MutableShortIterator |
shortIterator() |
int |
size() |
int |
sizeDistinct() |
long |
sum() |
short[] |
toArray() |
org.eclipse.collections.api.bag.primitive.ImmutableShortBag |
toImmutable() |
ShortHashBag |
with(short element) |
ShortHashBag |
with(short element1,
short element2) |
ShortHashBag |
with(short element1,
short element2,
short element3) |
ShortHashBag |
withAll(org.eclipse.collections.api.ShortIterable iterable) |
ShortHashBag |
without(short element) |
ShortHashBag |
withoutAll(org.eclipse.collections.api.ShortIterable iterable) |
void |
writeExternal(ObjectOutput out) |
appendString, appendString, asLazy, average, containsAll, containsAll, makeString, makeString, makeString, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toStringpublic ShortHashBag()
public ShortHashBag(int size)
public ShortHashBag(org.eclipse.collections.api.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(org.eclipse.collections.api.ShortIterable source)
public static ShortHashBag newBag(org.eclipse.collections.api.bag.primitive.ShortBag source)
public boolean isEmpty()
isEmpty in interface org.eclipse.collections.api.PrimitiveIterableisEmpty in class AbstractShortIterablepublic boolean notEmpty()
notEmpty in interface org.eclipse.collections.api.PrimitiveIterablenotEmpty in class AbstractShortIterablepublic int size()
size in interface org.eclipse.collections.api.PrimitiveIterablepublic int sizeDistinct()
sizeDistinct in interface org.eclipse.collections.api.bag.primitive.ShortBagpublic void clear()
clear in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic ShortHashBag with(short element)
with in interface org.eclipse.collections.api.bag.primitive.MutableShortBagwith in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic ShortHashBag with(short element1, short element2)
public ShortHashBag with(short element1, short element2, short element3)
public ShortHashBag withAll(org.eclipse.collections.api.ShortIterable iterable)
withAll in interface org.eclipse.collections.api.bag.primitive.MutableShortBagwithAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic ShortHashBag without(short element)
without in interface org.eclipse.collections.api.bag.primitive.MutableShortBagwithout in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic ShortHashBag withoutAll(org.eclipse.collections.api.ShortIterable iterable)
withoutAll in interface org.eclipse.collections.api.bag.primitive.MutableShortBagwithoutAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean contains(short value)
contains in interface org.eclipse.collections.api.ShortIterablepublic int occurrencesOf(short item)
occurrencesOf in interface org.eclipse.collections.api.bag.primitive.ShortBagpublic void forEachWithOccurrences(org.eclipse.collections.api.block.procedure.primitive.ShortIntProcedure procedure)
forEachWithOccurrences in interface org.eclipse.collections.api.bag.primitive.ShortBagpublic boolean add(short item)
add in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean remove(short item)
remove in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean addAll(short... source)
addAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean addAll(org.eclipse.collections.api.ShortIterable source)
addAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean removeAll(short... source)
removeAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean removeAll(org.eclipse.collections.api.ShortIterable source)
removeAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean retainAll(org.eclipse.collections.api.ShortIterable source)
retainAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic boolean retainAll(short... source)
retainAll in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic void addOccurrences(short item,
int occurrences)
addOccurrences in interface org.eclipse.collections.api.bag.primitive.MutableShortBagpublic boolean removeOccurrences(short item,
int occurrences)
removeOccurrences in interface org.eclipse.collections.api.bag.primitive.MutableShortBagpublic void forEach(org.eclipse.collections.api.block.procedure.primitive.ShortProcedure procedure)
forEach in interface org.eclipse.collections.api.ShortIterablepublic void each(org.eclipse.collections.api.block.procedure.primitive.ShortProcedure procedure)
each in interface org.eclipse.collections.api.ShortIterablepublic ShortHashBag select(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate)
select in interface org.eclipse.collections.api.bag.primitive.MutableShortBagselect in interface org.eclipse.collections.api.bag.primitive.ShortBagselect in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionselect in interface org.eclipse.collections.api.ShortIterablepublic ShortHashBag reject(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate)
reject in interface org.eclipse.collections.api.bag.primitive.MutableShortBagreject in interface org.eclipse.collections.api.bag.primitive.ShortBagreject in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionreject in interface org.eclipse.collections.api.ShortIterablepublic <T> T injectInto(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectShortToObjectFunction<? super T,? extends T> function)
injectInto in interface org.eclipse.collections.api.ShortIterablepublic boolean equals(Object otherBag)
public int hashCode()
public void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface org.eclipse.collections.api.PrimitiveIterablepublic int count(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate)
count in interface org.eclipse.collections.api.ShortIterablepublic boolean anySatisfy(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate)
anySatisfy in interface org.eclipse.collections.api.ShortIterablepublic boolean allSatisfy(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate)
allSatisfy in interface org.eclipse.collections.api.ShortIterablepublic boolean noneSatisfy(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate)
noneSatisfy in interface org.eclipse.collections.api.ShortIterablepublic short detectIfNone(org.eclipse.collections.api.block.predicate.primitive.ShortPredicate predicate,
short ifNone)
detectIfNone in interface org.eclipse.collections.api.ShortIterablepublic <V> org.eclipse.collections.api.bag.MutableBag<V> collect(org.eclipse.collections.api.block.function.primitive.ShortToObjectFunction<? extends V> function)
collect in interface org.eclipse.collections.api.bag.primitive.MutableShortBagcollect in interface org.eclipse.collections.api.bag.primitive.ShortBagcollect in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectioncollect in interface org.eclipse.collections.api.ShortIterablepublic short max()
max in interface org.eclipse.collections.api.ShortIterablepublic short min()
min in interface org.eclipse.collections.api.ShortIterablepublic long sum()
sum in interface org.eclipse.collections.api.ShortIterablepublic short[] toArray()
toArray in interface org.eclipse.collections.api.ShortIterablepublic org.eclipse.collections.api.bag.primitive.MutableShortBag asUnmodifiable()
asUnmodifiable in interface org.eclipse.collections.api.bag.primitive.MutableShortBagasUnmodifiable in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic org.eclipse.collections.api.bag.primitive.MutableShortBag asSynchronized()
asSynchronized in interface org.eclipse.collections.api.bag.primitive.MutableShortBagasSynchronized in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic org.eclipse.collections.api.bag.primitive.ImmutableShortBag toImmutable()
toImmutable in interface org.eclipse.collections.api.bag.primitive.MutableShortBagtoImmutable in interface org.eclipse.collections.api.bag.primitive.ShortBagtoImmutable in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionpublic org.eclipse.collections.api.iterator.MutableShortIterator shortIterator()
shortIterator in interface org.eclipse.collections.api.collection.primitive.MutableShortCollectionshortIterator in interface org.eclipse.collections.api.ShortIterablepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException
readExternal in interface ExternalizableIOExceptionCopyright © 2004–2018. All rights reserved.