K - the type of the keyV - the type of the valuepublic class FastHashMap<K,V> extends Object implements Serializable
| Constructor and Description |
|---|
FastHashMap() |
FastHashMap(int size,
float fillFactor) |
| Modifier and Type | Method and Description |
|---|---|
static int |
arraySize(int expected,
float f)
Returns the least power of two smaller than or equal to 230 and larger than or equal to
Math.ceil( expected / f ). |
void |
clear()
Clears the map, reuses the data structure by clearing it out.
|
V |
get(K key) |
List<K> |
keys() |
static long |
nextPowerOfTwo(long x)
Return the least power of two greater than or equal to the specified value.
|
V |
put(K key,
V value) |
V |
remove(K key) |
int |
size() |
List<V> |
values() |
public FastHashMap()
public FastHashMap(int size,
float fillFactor)
public int size()
public void clear()
public static long nextPowerOfTwo(long x)
Note that this function will return 1 when the argument is 0.
x - a long integer smaller than or equal to 262.public static int arraySize(int expected,
float f)
Math.ceil( expected / f ).expected - the expected number of elements in a hash table.f - the load factor.IllegalArgumentException - if the necessary size is larger than 230.Copyright © 2024 HtmlUnit. All rights reserved.