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

public Class IntHashSet

extends AbstractIntSet
implements MutableIntSet, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.set.primitive.MutableIntSet, org.eclipse.collections.api.set.primitive.IntSet, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableIntCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, .Serializable, java.util.Arrays, .Collection, .NoSuchElementException, org.eclipse.collections.api.IntIterable, .RichIterable, org.eclipse.collections.api.block.function.primitive.IntToObjectFunction, .ObjectIntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntProcedure, org.eclipse.collections.api.collection.primitive.MutableIntCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.IntSets, org.eclipse.collections.api.iterator.IntIterator, .MutableIntIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.set.ImmutableSet, .MutableSet, org.eclipse.collections.api.set.primitive.ImmutableIntSet, .MutableIntSet, .IntSet, org.eclipse.collections.impl.set.immutable.primitive.ImmutableIntSetSerializationProxy, .AbstractImmutableIntSet, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.SpreadFunctions, org.eclipse.collections.impl.set.primitive.AbstractIntSet

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 int
private static final int
private static final int
private int
private int
private static final int
private static final long
private int[]
private int
private int

Constructor Summary

AccessConstructor and Description
public
public
IntHashSet(int initialCapacity)

public
IntHashSet(int... elements)

public
public

Method Summary

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

public boolean
allSatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.allSatisfy.

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

public boolean
anySatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.anySatisfy.

Returns true if any of the elements in the IntIterable 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 MutableIntSet
public MutableIntSet
public MutableSet<Integer>
public RichIterable<IntIterable>
chunk(int size)

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

Partitions elements in fixed size chunks.

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

Implements org.eclipse.collections.api.set.primitive.MutableIntSet.collect, org.eclipse.collections.api.set.primitive.IntSet.collect, org.eclipse.collections.api.IntIterable.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(IntToObjectFunction<? extends V> function, R target)

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

Same as collect(IntToObjectFunction) , 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(int value)

Implements org.eclipse.collections.api.IntIterable.contains.

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

private void
public int
count(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.count.

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

public int
public void
each(IntProcedure procedure)

Implements org.eclipse.collections.api.IntIterable.each.

A synonym for forEach.

public IntSet
public int
public <T> T
injectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.IntIterable.injectInto.

public MutableIntIterator
intIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableIntCollection.intIterator, org.eclipse.collections.api.IntIterable.intIterator.

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

private static boolean
private static boolean
isNonSentinel(int value)

private int
mask(int spread)

public int
private int
public int
public IntHashSet
newEmpty()

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

Creates a new empty IntHashSet.

public static IntHashSet
public static IntHashSet
newSetWith(int... source)

pack-priv int
probe(int element)

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

pack-priv int
probeTwo(int 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 IntHashSet
reject(IntPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableIntSet.reject, org.eclipse.collections.api.set.primitive.IntSet.reject, org.eclipse.collections.api.IntIterable.reject.

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

public <R extends MutableIntCollection> R
reject(IntPredicate predicate, R target)

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

Same as reject(IntPredicate) , only the results are added to the target MutableIntCollection.

public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
public IntHashSet
select(IntPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableIntSet.select, org.eclipse.collections.api.set.primitive.IntSet.select, org.eclipse.collections.api.IntIterable.select.

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

public <R extends MutableIntCollection> R
select(IntPredicate predicate, R target)

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

Same as select(IntPredicate) , only the results are added to the target MutableIntCollection.

public int
size()

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

Returns the number of items in this iterable.

private int
pack-priv int
spreadAndMask(int element)

pack-priv int
spreadTwoAndMask(int element)

public long
public int[]
toArray()

Implements org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array.

public int[]
toArray(int[] array)

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

Converts the IntIterable to a primitive int array.

public ImmutableIntSet
public boolean
public IntHashSet
public IntHashSet
public IntHashSet
public IntHashSet
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.AbstractIntSet:
cartesianProductequals