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

public Class LongHashSet

extends AbstractLongSet
implements MutableLongSet, Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable, org.eclipse.collections.api.set.primitive.MutableLongSet, org.eclipse.collections.api.set.primitive.LongSet, org.eclipse.collections.api.LongIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.MutableLongCollection
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, .Serializable, java.util.Arrays, .Collection, .NoSuchElementException, org.eclipse.collections.api.LongIterable, .RichIterable, org.eclipse.collections.api.block.function.primitive.LongToObjectFunction, .ObjectLongToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.LongPredicate, org.eclipse.collections.api.block.procedure.primitive.LongProcedure, org.eclipse.collections.api.collection.primitive.MutableLongCollection, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.LongSets, org.eclipse.collections.api.iterator.LongIterator, .MutableLongIterator, org.eclipse.collections.api.list.MutableList, org.eclipse.collections.api.set.ImmutableSet, .MutableSet, org.eclipse.collections.api.set.primitive.ImmutableLongSet, .MutableLongSet, .LongSet, org.eclipse.collections.impl.set.immutable.primitive.ImmutableLongSetSerializationProxy, .AbstractImmutableLongSet, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.SpreadFunctions, org.eclipse.collections.impl.set.primitive.AbstractLongSet

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

Constructor Summary

AccessConstructor and Description
public
public
LongHashSet(int initialCapacity)

public
LongHashSet(long... elements)

public
public

Method Summary

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

public boolean
allSatisfy(LongPredicate predicate)

Implements org.eclipse.collections.api.LongIterable.allSatisfy.

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

public boolean
anySatisfy(LongPredicate predicate)

Implements org.eclipse.collections.api.LongIterable.anySatisfy.

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

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

Partitions elements in fixed size chunks.

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

Implements org.eclipse.collections.api.set.primitive.MutableLongSet.collect, org.eclipse.collections.api.set.primitive.LongSet.collect, org.eclipse.collections.api.LongIterable.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(LongToObjectFunction<? extends V> function, R target)

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

Same as collect(LongToObjectFunction) , 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(long value)

Implements org.eclipse.collections.api.LongIterable.contains.

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

private void
public int
count(LongPredicate predicate)

Implements org.eclipse.collections.api.LongIterable.count.

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

public long
public void
each(LongProcedure procedure)

Implements org.eclipse.collections.api.LongIterable.each.

A synonym for forEach.

public LongSet
public int
public <T> T
injectInto(T injectedValue, ObjectLongToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.LongIterable.injectInto.

private static boolean
private static boolean
isNonSentinel(long value)

public MutableLongIterator
longIterator()

Implements org.eclipse.collections.api.collection.primitive.MutableLongCollection.longIterator, org.eclipse.collections.api.LongIterable.longIterator.

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

private int
mask(int spread)

public long
private int
public long
public LongHashSet
newEmpty()

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

Creates a new empty LongHashSet.

public static LongHashSet
public static LongHashSet
newSetWith(long... source)

pack-priv int
probe(long element)

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

pack-priv int
probeTwo(long 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 LongHashSet
reject(LongPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableLongSet.reject, org.eclipse.collections.api.set.primitive.LongSet.reject, org.eclipse.collections.api.LongIterable.reject.

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

public <R extends MutableLongCollection> R
reject(LongPredicate predicate, R target)

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

Same as reject(LongPredicate) , only the results are added to the target MutableLongCollection.

public boolean
public boolean
public boolean
private boolean
public boolean
public boolean
public LongHashSet
select(LongPredicate predicate)

Implements org.eclipse.collections.api.set.primitive.MutableLongSet.select, org.eclipse.collections.api.set.primitive.LongSet.select, org.eclipse.collections.api.LongIterable.select.

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

public <R extends MutableLongCollection> R
select(LongPredicate predicate, R target)

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

Same as select(LongPredicate) , only the results are added to the target MutableLongCollection.

public int
size()

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

Returns the number of items in this iterable.

private int
pack-priv int
spreadAndMask(long element)

pack-priv int
spreadTwoAndMask(long element)

public long
public long[]
toArray()

Implements org.eclipse.collections.api.LongIterable.toArray.

Converts the LongIterable to a primitive long array.

public long[]
toArray(long[] array)

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

Converts the LongIterable to a primitive long array.

public ImmutableLongSet
public boolean
public LongHashSet
public LongHashSet
public LongHashSet
public LongHashSet
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.AbstractLongSet:
cartesianProductequals