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
public class ShortHashSet extends AbstractShortSet implements MutableShortSet, Externalizable
This file was automatically generated from template file primitiveHashSet.stg.- Since:
- 3.0.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ShortHashSet()ShortHashSet(int initialCapacity)ShortHashSet(short... elements)ShortHashSet(ShortIterable elements)ShortHashSet(ShortHashSet set)
-
Method Summary
-
Methods inherited from class org.eclipse.collections.impl.set.primitive.AbstractShortSet
cartesianProduct, equals
-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableShortCollection
removeIf
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.MutableShortSet
difference, intersect, symmetricDifference, tap, union
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, toString
-
Methods 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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.set.primitive.ShortSet
cartesianProduct, equals, isProperSubsetOf, isSubsetOf, tap
-
-
-
-
Constructor Detail
-
ShortHashSet
public ShortHashSet()
-
ShortHashSet
public ShortHashSet(int initialCapacity)
-
ShortHashSet
public ShortHashSet(short... elements)
-
ShortHashSet
public ShortHashSet(ShortIterable elements)
-
ShortHashSet
public ShortHashSet(ShortHashSet set)
-
-
Method Detail
-
boxed
public MutableSet<Short> boxed()
- Specified by:
boxedin interfaceMutableShortSet
-
newSet
public static ShortHashSet newSet(ShortIterable source)
-
newSetWith
public static ShortHashSet newSetWith(short... source)
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceShortSet- Specified by:
hashCodein classAbstractShortSet
-
size
public int size()
- Specified by:
sizein interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- 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
public boolean addAll(ShortIterable source)
- Specified by:
addAllin interfaceMutableShortCollection
-
remove
public boolean remove(short value)
- Specified by:
removein interfaceMutableShortCollection
-
removeAll
public boolean removeAll(ShortIterable source)
- Specified by:
removeAllin interfaceMutableShortCollection
-
removeAll
public boolean removeAll(short... source)
- Specified by:
removeAllin interfaceMutableShortCollection
-
retainAll
public boolean retainAll(ShortIterable source)
- Specified by:
retainAllin interfaceMutableShortCollection
-
retainAll
public boolean retainAll(short... source)
- Specified by:
retainAllin interfaceMutableShortCollection
-
clear
public void clear()
- Specified by:
clearin interfaceMutableShortCollection
-
with
public ShortHashSet with(short element)
- Specified by:
within interfaceMutableShortCollection- Specified by:
within interfaceMutableShortSet
-
without
public ShortHashSet without(short element)
- Specified by:
withoutin interfaceMutableShortCollection- Specified by:
withoutin interfaceMutableShortSet
-
withAll
public ShortHashSet withAll(ShortIterable elements)
- Specified by:
withAllin interfaceMutableShortCollection- Specified by:
withAllin interfaceMutableShortSet
-
withoutAll
public ShortHashSet withoutAll(ShortIterable elements)
- Specified by:
withoutAllin interfaceMutableShortCollection- Specified by:
withoutAllin interfaceMutableShortSet
-
asUnmodifiable
public MutableShortSet asUnmodifiable()
- Specified by:
asUnmodifiablein interfaceMutableShortCollection- Specified by:
asUnmodifiablein interfaceMutableShortSet
-
asSynchronized
public MutableShortSet asSynchronized()
- Specified by:
asSynchronizedin interfaceMutableShortCollection- Specified by:
asSynchronizedin interfaceMutableShortSet
-
toImmutable
public ImmutableShortSet toImmutable()
- Specified by:
toImmutablein interfaceMutableShortCollection- Specified by:
toImmutablein interfaceMutableShortSet- Specified by:
toImmutablein interfaceShortSet
-
shortIterator
public MutableShortIterator 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
public void each(ShortProcedure procedure)
- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
select
public ShortHashSet select(ShortPredicate predicate)
- Specified by:
selectin interfaceMutableShortCollection- Specified by:
selectin interfaceMutableShortSet- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortSet
-
select
public <R extends MutableShortCollection> R select(ShortPredicate predicate, R target)
- Specified by:
selectin interfaceShortIterable- Since:
- 8.1.
-
reject
public ShortHashSet reject(ShortPredicate predicate)
- Specified by:
rejectin interfaceMutableShortCollection- Specified by:
rejectin interfaceMutableShortSet- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortSet
-
reject
public <R extends MutableShortCollection> R reject(ShortPredicate predicate, R target)
- Specified by:
rejectin interfaceShortIterable- Since:
- 8.1.
-
collect
public <V> MutableSet<V> collect(ShortToObjectFunction<? extends V> function)
- 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
public short detectIfNone(ShortPredicate predicate, short ifNone)
- Specified by:
detectIfNonein interfaceShortIterable
-
count
public int count(ShortPredicate predicate)
- Specified by:
countin interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
- 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
public ShortSet freeze()
- Specified by:
freezein interfaceMutableShortSet- Specified by:
freezein interfaceShortSet
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOException
-
injectInto
public <T> T injectInto(T injectedValue, ObjectShortToObjectFunction<? super T,? extends T> function)- Specified by:
injectIntoin interfaceShortIterable
-
chunk
public RichIterable<ShortIterable> chunk(int size)
- Specified by:
chunkin interfaceShortIterable
-
newEmpty
public ShortHashSet 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 public void 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.
-
-