Package gnu.trove.impl.hash
Class TCustomObjectHash<T>
java.lang.Object
gnu.trove.impl.hash.THash
gnu.trove.impl.hash.TObjectHash<T>
gnu.trove.impl.hash.TCustomObjectHash<T>
- All Implemented Interfaces:
Externalizable
,Serializable
- Direct Known Subclasses:
TCustomHashMap
,TCustomHashSet
,TObjectByteCustomHashMap
,TObjectCharCustomHashMap
,TObjectDoubleCustomHashMap
,TObjectFloatCustomHashMap
,TObjectIntCustomHashMap
,TObjectLongCustomHashMap
,TObjectShortCustomHashMap
An open addressed hashing implementation for Object types.
- See Also:
-
Field Summary
FieldsFields inherited from class gnu.trove.impl.hash.TObjectHash
_set, consumeFreeSlot, FREE, REMOVED
Fields inherited from class gnu.trove.impl.hash.THash
_autoCompactionFactor, _autoCompactRemovesRemaining, _autoCompactTemporaryDisable, _free, _loadFactor, _maxSize, _size, DEFAULT_CAPACITY, DEFAULT_LOAD_FACTOR
-
Constructor Summary
ConstructorsConstructorDescriptionFOR EXTERNALIZATION ONLY!!!TCustomObjectHash
(HashingStrategy<? super T> strategy) Creates a newTManualObjectHash
instance with the default capacity and load factor.TCustomObjectHash
(HashingStrategy<? super T> strategy, int initialCapacity) Creates a newTManualObjectHash
instance whose capacity is the next highest prime above initialCapacity + 1 unless that value is already prime.TCustomObjectHash
(HashingStrategy<? super T> strategy, int initialCapacity, float loadFactor) Creates a newTManualObjectHash
instance with a prime value at or near the specified capacity and load factor. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected int
void
void
Methods inherited from class gnu.trove.impl.hash.TObjectHash
buildObjectContractViolation, capacity, contains, dumpExtraInfo, forEach, index, insertionIndex, insertKey, objectInfo, removeAt, reportPotentialConcurrentMod, setUp, throwObjectContractViolation, throwObjectContractViolation
Methods inherited from class gnu.trove.impl.hash.THash
calculateGrownCapacity, clear, compact, computeMaxSize, computeNextAutoCompactionAmount, ensureCapacity, fastCeil, getAutoCompactionFactor, isEmpty, postInsertHook, reenableAutoCompaction, rehash, saturatedCast, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSize
-
Field Details
-
strategy
-
-
Constructor Details
-
TCustomObjectHash
public TCustomObjectHash()FOR EXTERNALIZATION ONLY!!! -
TCustomObjectHash
Creates a newTManualObjectHash
instance with the default capacity and load factor. -
TCustomObjectHash
Creates a newTManualObjectHash
instance whose capacity is the next highest prime above initialCapacity + 1 unless that value is already prime.- Parameters:
initialCapacity
- anint
value
-
TCustomObjectHash
public TCustomObjectHash(HashingStrategy<? super T> strategy, int initialCapacity, float loadFactor) Creates a newTManualObjectHash
instance with a prime value at or near the specified capacity and load factor.- Parameters:
initialCapacity
- used to find a prime capacity for the table.loadFactor
- used to calculate the threshold over which rehashing takes place.
-
-
Method Details
-
hash
- Overrides:
hash
in classTObjectHash<T>
-
equals
- Overrides:
equals
in classTObjectHash<T>
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classTObjectHash<T>
- Throws:
IOException
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classTObjectHash<T>
- Throws:
IOException
ClassNotFoundException
-