Top Description Fields Constructors Methods
com.carrotsearch.hppc

public Class ObjectIdentityHashSet<KType>

extends ObjectHashSet<KType>
Class Inheritance
Static Imports
com.carrotsearch.hppc.Containers.*, com.carrotsearch.hppc.HashContainers.*

A reference-equality (identity) hash set.

Field Summary

Inherited from com.carrotsearch.hppc.ObjectHashSet:
assignedhasEmptyKeyiterationSeedkeysloadFactormaskresizeAt

Constructor Summary

AccessConstructor and Description
public
ObjectIdentityHashSet()

New instance with sane defaults.

public
ObjectIdentityHashSet(int expectedElements)

New instance with sane defaults.

public
ObjectIdentityHashSet(int
The expected number of elements guaranteed not to cause a rehash (inclusive).
expectedElements
,
double
The load factor for internal buffers. Insane load factors (zero, full capacity) are rejected by verifyLoadFactor(double).
loadFactor
)

New instance with the provided defaults.

public
ObjectIdentityHashSet(ObjectContainer<? extends KType> container)

New instance copying elements from another ObjectContainer.

Method Summary

Modifier and TypeMethod and Description
protected boolean
public static <KType> ObjectIdentityHashSet<KType>
from(KType... elements)

Hides com.carrotsearch.hppc.ObjectHashSet.from.

Create a set from a variable number of arguments or an array of KType.

protected int
hashKey(KType key)

Overrides com.carrotsearch.hppc.ObjectHashSet.hashKey.

Returns a hash code for the given key.

Inherited from com.carrotsearch.hppc.ObjectHashSet:
addaddAlladdAlladdAllallocateBuffersallocateThenInsertThenRehashclearclonecontainsensureCapacityequalsforEachforEachhashCodeindexExistsindexGetindexInsertindexOfindexRemoveindexReplaceisEmptyiteratornextIterationSeedramBytesAllocatedramBytesUsedrehashreleaseremoveremoveAllremoveAllremoveAllshiftConflictingKeyssizetoArrayverifyLoadFactorvisualizeKeyDistribution

Constructor Detail

ObjectIdentityHashSetback to summary
public ObjectIdentityHashSet()

New instance with sane defaults.

ObjectIdentityHashSetback to summary
public ObjectIdentityHashSet(int expectedElements)

New instance with sane defaults.

ObjectIdentityHashSetback to summary
public ObjectIdentityHashSet(int expectedElements, double loadFactor)

New instance with the provided defaults.

Parameters
expectedElements:int

The expected number of elements guaranteed not to cause a rehash (inclusive).

loadFactor:double

The load factor for internal buffers. Insane load factors (zero, full capacity) are rejected by verifyLoadFactor(double).

ObjectIdentityHashSetback to summary
public ObjectIdentityHashSet(ObjectContainer<? extends KType> container)

New instance copying elements from another ObjectContainer.

Method Detail

equalsback to summary
protected boolean equals(Object v1, Object v2)

Overrides com.carrotsearch.hppc.AbstractObjectCollection.equals.

Annotations
@Override
fromback to summary
public static <KType> ObjectIdentityHashSet<KType> from(KType... elements)

Hides com.carrotsearch.hppc.ObjectHashSet.from.

Create a set from a variable number of arguments or an array of KType. The elements are copied from the argument to the internal buffer.

Annotations
@SafeVarargs
hashKeyback to summary
protected int hashKey(KType key)

Overrides com.carrotsearch.hppc.ObjectHashSet.hashKey.

Doc from com.carrotsearch.hppc.ObjectHashSet.hashKey.

Returns a hash code for the given key.

The output from this function should evenly distribute keys across the entire integer range.

Annotations
@Override