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, REMOVEDFields 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 newTManualObjectHashinstance with the default capacity and load factor.TCustomObjectHash(HashingStrategy<? super T> strategy, int initialCapacity) Creates a newTManualObjectHashinstance 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 newTManualObjectHashinstance with a prime value at or near the specified capacity and load factor. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected intvoidvoidMethods inherited from class gnu.trove.impl.hash.TObjectHash
buildObjectContractViolation, capacity, contains, dumpExtraInfo, forEach, index, insertionIndex, insertKey, objectInfo, removeAt, reportPotentialConcurrentMod, setUp, throwObjectContractViolation, throwObjectContractViolationMethods 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 newTManualObjectHashinstance with the default capacity and load factor. -
TCustomObjectHash
Creates a newTManualObjectHashinstance whose capacity is the next highest prime above initialCapacity + 1 unless that value is already prime.- Parameters:
initialCapacity- anintvalue
-
TCustomObjectHash
public TCustomObjectHash(HashingStrategy<? super T> strategy, int initialCapacity, float loadFactor) Creates a newTManualObjectHashinstance 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:
hashin classTObjectHash<T>
-
equals
- Overrides:
equalsin classTObjectHash<T>
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classTObjectHash<T>- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classTObjectHash<T>- Throws:
IOExceptionClassNotFoundException
-