Class ShortHashSet
java.lang.Object
org.eclipse.collections.impl.primitive.AbstractShortIterable
org.eclipse.collections.impl.set.primitive.AbstractShortSet
org.eclipse.collections.impl.set.mutable.primitive.ShortHashSet
- All Implemented Interfaces:
Externalizable,Serializable,MutableShortCollection,PrimitiveIterable,MutableShortSet,ShortSet,ShortIterable
This file was automatically generated from template file primitiveHashSet.stg.
- Since:
- 3.0.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionShortHashSet(int initialCapacity) ShortHashSet(short... elements) ShortHashSet(ShortIterable elements) ShortHashSet(ShortHashSet set) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(short element) booleanaddAll(short... source) booleanaddAll(ShortIterable source) booleanallSatisfy(ShortPredicate predicate) booleananySatisfy(ShortPredicate predicate) voidappendString(Appendable appendable, String start, String separator, String end) boxed()chunk(int size) voidclear()<V> MutableSet<V>collect(ShortToObjectFunction<? extends V> function) <V,R extends Collection<V>>
Rcollect(ShortToObjectFunction<? extends V> function, R target) voidcompact()Deprecated.booleancontains(short value) intcount(ShortPredicate predicate) shortdetectIfNone(ShortPredicate predicate, short ifNone) voideach(ShortProcedure procedure) freeze()inthashCode()<T> TinjectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) shortmax()shortmin()newEmpty()Creates a new empty ShortHashSet.static ShortHashSetnewSet(ShortIterable source) static ShortHashSetnewSetWith(short... source) voidreject(ShortPredicate predicate) <R extends MutableShortCollection>
Rreject(ShortPredicate predicate, R target) booleanremove(short value) booleanremoveAll(short... source) booleanremoveAll(ShortIterable source) booleanretainAll(short... source) booleanretainAll(ShortIterable source) select(ShortPredicate predicate) <R extends MutableShortCollection>
Rselect(ShortPredicate predicate, R target) intsize()longsum()short[]toArray()short[]toArray(short[] array) booleanwith(short element) withAll(ShortIterable elements) without(short element) withoutAll(ShortIterable elements) voidMethods inherited from class org.eclipse.collections.impl.set.primitive.AbstractShortSet
cartesianProduct, equalsMethods 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.collection.primitive.MutableShortCollection
removeIfMethods inherited from interface org.eclipse.collections.api.set.primitive.MutableShortSet
difference, intersect, symmetricDifference, tap, unionMethods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toStringMethods inherited from interface org.eclipse.collections.api.ShortIterable
asLazy, average, averageIfEmpty, 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, noneSatisfy, reduce, reduceIfEmpty, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.set.primitive.ShortSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
Constructor Details
-
ShortHashSet
public ShortHashSet() -
ShortHashSet
public ShortHashSet(int initialCapacity) -
ShortHashSet
public ShortHashSet(short... elements) -
ShortHashSet
-
ShortHashSet
-
-
Method Details
-
boxed
- Specified by:
boxedin interfaceMutableShortSet
-
newSet
-
newSetWith
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceShortSet- Specified by:
hashCodein classAbstractShortSet
-
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
add
public boolean add(short element) - Specified by:
addin interfaceMutableShortCollection
-
addAll
public boolean addAll(short... source) - Specified by:
addAllin interfaceMutableShortCollection
-
addAll
- Specified by:
addAllin interfaceMutableShortCollection
-
remove
public boolean remove(short value) - Specified by:
removein interfaceMutableShortCollection
-
removeAll
- Specified by:
removeAllin interfaceMutableShortCollection
-
removeAll
public boolean removeAll(short... source) - Specified by:
removeAllin interfaceMutableShortCollection
-
retainAll
- Specified by:
retainAllin interfaceMutableShortCollection
-
retainAll
public boolean retainAll(short... source) - Specified by:
retainAllin interfaceMutableShortCollection
-
clear
public void clear()- Specified by:
clearin interfaceMutableShortCollection
-
with
- Specified by:
within interfaceMutableShortCollection- Specified by:
within interfaceMutableShortSet
-
without
- Specified by:
withoutin interfaceMutableShortCollection- Specified by:
withoutin interfaceMutableShortSet
-
withAll
- Specified by:
withAllin interfaceMutableShortCollection- Specified by:
withAllin interfaceMutableShortSet
-
withoutAll
- Specified by:
withoutAllin interfaceMutableShortCollection- Specified by:
withoutAllin interfaceMutableShortSet
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableShortCollection- Specified by:
asUnmodifiablein interfaceMutableShortSet
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableShortCollection- Specified by:
asSynchronizedin interfaceMutableShortSet
-
toImmutable
- Specified by:
toImmutablein interfaceMutableShortCollection- Specified by:
toImmutablein interfaceMutableShortSet- Specified by:
toImmutablein interfaceShortSet
-
shortIterator
- Specified by:
shortIteratorin interfaceMutableShortCollection- Specified by:
shortIteratorin interfaceShortIterable
-
toArray
public short[] toArray()- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] array) - Specified by:
toArrayin interfaceShortIterable
-
contains
public boolean contains(short value) - Specified by:
containsin interfaceShortIterable
-
each
- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
select
- Specified by:
selectin interfaceMutableShortCollection- Specified by:
selectin interfaceMutableShortSet- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortSet
-
select
- Specified by:
selectin interfaceShortIterable- Since:
- 8.1.
-
reject
- Specified by:
rejectin interfaceMutableShortCollection- Specified by:
rejectin interfaceMutableShortSet- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortSet
-
reject
- Specified by:
rejectin interfaceShortIterable- Since:
- 8.1.
-
collect
- Specified by:
collectin interfaceMutableShortCollection- Specified by:
collectin interfaceMutableShortSet- Specified by:
collectin interfaceShortIterable- Specified by:
collectin interfaceShortSet
-
collect
public <V,R extends Collection<V>> R collect(ShortToObjectFunction<? extends V> function, R target) - Specified by:
collectin interfaceShortIterable- Since:
- 8.1.
-
detectIfNone
- Specified by:
detectIfNonein interfaceShortIterable
-
count
- Specified by:
countin interfaceShortIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceShortIterable
-
sum
public long sum()- Specified by:
sumin interfaceShortIterable
-
max
public short max()- Specified by:
maxin interfaceShortIterable
-
min
public short min()- Specified by:
minin interfaceShortIterable
-
freeze
- Specified by:
freezein interfaceMutableShortSet- Specified by:
freezein interfaceShortSet
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoin interfaceShortIterable
-
chunk
- Specified by:
chunkin interfaceShortIterable
-
newEmpty
Creates a new empty ShortHashSet.- Specified by:
newEmptyin interfaceMutableShortCollection- Specified by:
newEmptyin interfaceMutableShortSet- Since:
- 9.2.
-
trimToSize
public boolean trimToSize()- Since:
- 12.0
-
compact
Deprecated.since 12.0 - UsetrimToSize()insteadRehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.
-
trimToSize()instead