Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.set.mutable.primitive

public Class ShortHashSet

extends AbstractShortSet
implements MutableShortSet, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.set.primitive.MutableShortSet, org.eclipse.collections.api.set.primitive.ShortSet, org.eclipse.collections.api.ShortIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableShortCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, .Serializable, java.util.Arrays, .Collection, .NoSuchElementException, org.eclipse.collections.api.ShortIterable, .RichIterable, org.eclipse.collections.api.block.function.primitive.ShortToObjectFunction, .ObjectShortToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.ShortPredicate, org.eclipse.collections.api.block.procedure.primitive.ShortProcedure, org.eclipse.collections.api.collection.primitive.MutableShortCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.ShortSets, org.eclipse.collections.api.iterator.ShortIterator, .MutableShortIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.set.ImmutableSet, .MutableSet, org.eclipse.collections.api.set.primitive.ImmutableShortSet, .MutableShortSet, .ShortSet, org.eclipse.collections.impl.set.immutable.primitive.ImmutableShortSetSerializationProxy, .AbstractImmutableShortSet, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.SpreadFunctions, org.eclipse.collections.impl.set.primitive.AbstractShortSet

This file was automatically generated from template file primitiveHashSet.stg.
Since
3.0.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private class

Field Summary

Modifier and TypeField and Description
private static final int
private transient boolean
private static final int
private static final short
private static final int
private static final int
private int
private int
private static final short
private static final long
private short[]
private int
private int

Constructor Summary

AccessConstructor and Description
public
public
ShortHashSet(int initialCapacity)

public
ShortHashSet(short... elements)

public
public

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
public boolean
protected void
allocateTable(int sizeToAllocate)

public boolean
allSatisfy(ShortPredicate predicate)

Implements org.eclipse.collections.api.ShortIterable.allSatisfy.

Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(ShortPredicate predicate)

Implements org.eclipse.collections.api.ShortIterable.anySatisfy.

Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public MutableShortSet
public MutableShortSet
public MutableSet<Short>
public RichIterable<ShortIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.ShortIterable.chunk.

Partitions elements in fixed size chunks.

public void
public <V> MutableSet<V>
collect(ShortToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.set.primitive.MutableShortSet.collect, org.eclipse.collections.api.set.primitive.ShortSet.collect, org.eclipse.collections.api.ShortIterable.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public <V, R extends Collection<V>> R
collect(ShortToObjectFunction<? extends V> function, R target)

Overrides default org.eclipse.collections.api.ShortIterable.collect.

Same as collect(ShortToObjectFunction) , only the results are added to the target Collection.

public void
compact()
Deprecated since 12.0 - Use trimToSize() instead

Rehashes every element in the set into a new backing table of the smallest possible size and eliminating removed sentinels.

public boolean
contains(short value)

Implements org.eclipse.collections.api.ShortIterable.contains.

Returns true if the value is contained in the ShortIterable, and false if it is not.

private void
public int
count(ShortPredicate predicate)

Implements org.eclipse.collections.api.ShortIterable.count.

Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.

public short
public void
each(ShortProcedure procedure)

Implements org.eclipse.collections.api.ShortIterable.each.

A synonym for forEach.

public ShortSet
public int
public <T> T
injectInto(T injectedValue, ObjectShortToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.ShortIterable.injectInto.

private static boolean
private static boolean
isNonSentinel(short value)

private int
mask(int spread)

public short
private int
public short
public ShortHashSet
newEmpty()

Overrides default org.eclipse.collections.api.set.primitive.MutableShortSet.newEmpty.

Creates a new empty ShortHashSet.

public static ShortHashSet
public static ShortHashSet
newSetWith(short... source)

pack-priv int
probe(short element)

pack-priv int
probeThree(short element, int removedIndex)

pack-priv int
probeTwo(short element, int removedIndex)

public void
readExternal(ObjectInput in)

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

private void
rehash(int newCapacity)

private void
public ShortHashSet
reject(ShortPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableShortSet.reject, org.eclipse.collections.api.set.primitive.ShortSet.reject, org.eclipse.collections.api.ShortIterable.reject.

Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.

public <R extends MutableShortCollection> R
reject(ShortPredicate predicate, R target)

Overrides default org.eclipse.collections.api.ShortIterable.reject.

Same as reject(ShortPredicate) , only the results are added to the target MutableShortCollection.

public boolean
public boolean
public boolean
private boolean
removeZeroToThirtyOne(short value)

public boolean
public boolean
public ShortHashSet
select(ShortPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableShortSet.select, org.eclipse.collections.api.set.primitive.ShortSet.select, org.eclipse.collections.api.ShortIterable.select.

Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.

public <R extends MutableShortCollection> R
select(ShortPredicate predicate, R target)

Overrides default org.eclipse.collections.api.ShortIterable.select.

Same as select(ShortPredicate) , only the results are added to the target MutableShortCollection.

public MutableShortIterator
shortIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableShortCollection.shortIterator, org.eclipse.collections.api.ShortIterable.shortIterator.

Returns a primitive iterator that can be used to iterate over the ShortIterable in an imperative style.

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the number of items in this iterable.

private int
pack-priv int
spreadAndMask(short element)

pack-priv int
spreadTwoAndMask(short element)

public long
public short[]
toArray()

Implements org.eclipse.collections.api.ShortIterable.toArray.

Converts the ShortIterable to a primitive short array.

public short[]
toArray(short[] array)

Overrides default org.eclipse.collections.api.ShortIterable.toArray.

Converts the ShortIterable to a primitive short array.

public ImmutableShortSet
public boolean
public ShortHashSet
public ShortHashSet
public ShortHashSet
public ShortHashSet
public void
writeExternal(ObjectOutput out)

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.set.primitive.AbstractShortSet:
cartesianProductequals