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:
- java.io.Externalizable, java.io.Serializable
- Direct Known Subclasses:
- TCustomHashMap, TCustomHashSet, TObjectByteCustomHashMap, TObjectCharCustomHashMap, TObjectDoubleCustomHashMap, TObjectFloatCustomHashMap, TObjectIntCustomHashMap, TObjectLongCustomHashMap, TObjectShortCustomHashMap
public abstract class TCustomObjectHash<T> extends TObjectHash<T>
An open addressed hashing implementation for Object types.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class gnu.trove.impl.hash.TObjectHash
_set, FREE, REMOVED
-
-
Constructor Summary
Constructors Constructor and Description TCustomObjectHash()FOR 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidreadExternal(java.io.ObjectInput in)voidwriteExternal(java.io.ObjectOutput out)-
Methods inherited from class gnu.trove.impl.hash.TObjectHash
capacity, contains, forEach, setUp
-
Methods inherited from class gnu.trove.impl.hash.THash
clear, compact, ensureCapacity, getAutoCompactionFactor, isEmpty, reenableAutoCompaction, setAutoCompactionFactor, size, tempDisableAutoCompaction, trimToSize
-
-
-
-
Constructor Detail
-
TCustomObjectHash
public TCustomObjectHash()
FOR EXTERNALIZATION ONLY!!!
-
TCustomObjectHash
public TCustomObjectHash(HashingStrategy<? super T> strategy)
Creates a newTManualObjectHashinstance with the default capacity and load factor.
-
TCustomObjectHash
public 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.- 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 Detail
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Overrides:
writeExternalin classTObjectHash<T>- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Overrides:
readExternalin classTObjectHash<T>- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
-
DataMelt 3.0 © DataMelt by jWork.ORG