public class HashTableUtil
extends java.lang.Object
Constructor and Description |
---|
HashTableUtil() |
Modifier and Type | Method and Description |
---|---|
static int |
calculateCapacity(int x)
Calculates a new capacity.
|
static int |
calculateThreshold(int buckets,
float loadFactor)
Computes the threshold for rehashing.
|
static boolean |
equals(int[] a,
int[] a2)
Equality check for integer arrays.
|
static int |
hashcode_old(int[] array)
Computes a hashcode for an integer array.
|
static int |
hashcode(int[] array)
Computes a hashcode for an integer array, partially unrolled.
|
static void |
nullifyArray(java.lang.Object[] array)
Returns the same result as Arrays.fill(array, null)
|
public static final int calculateCapacity(int x)
x
- the parameterpublic static final int calculateThreshold(int buckets, float loadFactor)
buckets
- loadFactor
- public static final boolean equals(int[] a, int[] a2)
a
- an arraya2
- another arraypublic static final int hashcode(int[] array)
array
- public static final int hashcode_old(int[] array)
array
- the arraypublic static final void nullifyArray(java.lang.Object[] array)
array
- the array