Top Description Fields Constructors Methods
com.carrotsearch.hppc

public Class ObjectObjectIdentityHashMap<KType, VType>

extends ObjectObjectHashMap<KType, VType>
Class Inheritance
Annotations
@Generated:KTypeVTypeIdentityHashMap.java
date:2024-06-04T15:20:16+0200
Static Imports
com.carrotsearch.hppc.Containers.*, com.carrotsearch.hppc.HashContainers.*

An identity hash map of Object to Object.

Field Summary

Inherited from com.carrotsearch.hppc.ObjectObjectHashMap:
assignedhasEmptyKeyiterationSeedkeysloadFactormaskresizeAtvalues

Constructor Summary

AccessConstructor and Description
public
ObjectObjectIdentityHashMap()

New instance with sane defaults.

public
ObjectObjectIdentityHashMap(int
The expected number of elements guaranteed not to cause buffer expansion (inclusive).
expectedElements
)

New instance with sane defaults.

public
ObjectObjectIdentityHashMap(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
ObjectObjectIdentityHashMap(ObjectObjectAssociativeContainer<? extends KType, ? extends VType> container)

Create a hash map from all key-value pairs of another container.

Method Summary

Modifier and TypeMethod and Description
protected boolean
equalElements(ObjectObjectHashMap<?, ?> other)

Overrides com.carrotsearch.hppc.ObjectObjectHashMap.equalElements.

Return true if all keys of some other container exist in this container.

public boolean
public static <KType, VType> ObjectObjectIdentityHashMap<KType, VType>
from(KType[] keys, VType[] values)

Hides com.carrotsearch.hppc.ObjectObjectHashMap.from.

Creates a hash map from two index-aligned arrays of key-value pairs.

public int
hashKey(KType key)

Overrides com.carrotsearch.hppc.ObjectObjectHashMap.hashKey.

Returns a hash code for the given key.

Inherited from com.carrotsearch.hppc.ObjectObjectHashMap:
allocateBuffersallocateThenInsertThenRehashclearclonecontainsKeyensureCapacityequalsforEachforEachgetgetOrDefaulthashCodeindexExistsindexGetindexInsertindexOfindexRemoveindexReplaceisEmptyiteratorkeysnextIterationSeedputputAllputAllramBytesAllocatedramBytesUsedrehashreleaseremoveremoveAllremoveAllremoveAllshiftConflictingKeyssizetoStringvaluesverifyLoadFactorvisualizeKeyDistribution

Constructor Detail

ObjectObjectIdentityHashMapback to summary
public ObjectObjectIdentityHashMap()

New instance with sane defaults.

ObjectObjectIdentityHashMapback to summary
public ObjectObjectIdentityHashMap(int expectedElements)

New instance with sane defaults.

Parameters
expectedElements:int

The expected number of elements guaranteed not to cause buffer expansion (inclusive).

ObjectObjectIdentityHashMapback to summary
public ObjectObjectIdentityHashMap(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).

ObjectObjectIdentityHashMapback to summary
public ObjectObjectIdentityHashMap(ObjectObjectAssociativeContainer<? extends KType, ? extends VType> container)

Create a hash map from all key-value pairs of another container.

Method Detail

equalElementsback to summary
protected boolean equalElements(ObjectObjectHashMap<?, ?> other)

Overrides com.carrotsearch.hppc.ObjectObjectHashMap.equalElements.

Doc from com.carrotsearch.hppc.ObjectObjectHashMap.equalElements.

Return true if all keys of some other container exist in this container. Equality comparison is performed with this object's equals(Object, Object) method. Values are compared using Objects#equals(Object) method.

Annotations
@SuppressWarnings:unchecked
@Override
equalsback to summary
public boolean equals(Object v1, Object v2)

Overrides com.carrotsearch.hppc.ObjectObjectHashMap.equals.

Annotations
@Override
fromback to summary
public static <KType, VType> ObjectObjectIdentityHashMap<KType, VType> from(KType[] keys, VType[] values)

Hides com.carrotsearch.hppc.ObjectObjectHashMap.from.

Creates a hash map from two index-aligned arrays of key-value pairs.

hashKeyback to summary
public int hashKey(KType key)

Overrides com.carrotsearch.hppc.ObjectObjectHashMap.hashKey.

Doc from com.carrotsearch.hppc.ObjectObjectHashMap.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