| java.lang.Object com.uwyn.rife.pcj.map.AbstractIntKeyIntMap com.uwyn.rife.pcj.map.IntKeyIntChainedHashMap
Field Summary | |
final public static int | DEFAULT_CAPACITY The default capacity of this map. | final public static int | DEFAULT_GROWTH_CHUNK The default chunk size with which to increase the capacity of this map. | final public static double | DEFAULT_GROWTH_FACTOR The default factor with which to increase the capacity of this map. | final public static double | DEFAULT_LOAD_FACTOR The default load factor of this map. |
Constructor Summary | |
public | IntKeyIntChainedHashMap() Creates a new hash map with capacity 11, a relative
growth factor of 1.0, and a load factor of 75%. | public | IntKeyIntChainedHashMap(IntKeyIntMap map) Creates a new hash map with the same mappings as a specified map. | public | IntKeyIntChainedHashMap(int capacity) Creates a new hash map with a specified capacity, a relative
growth factor of 1.0, and a load factor of 75%. | public | IntKeyIntChainedHashMap(double loadFactor) Creates a new hash map with a capacity of 11, a relative
growth factor of 1.0, and a specified load factor. | public | IntKeyIntChainedHashMap(int capacity, double loadFactor) Creates a new hash map with a specified capacity and
load factor, and a relative growth factor of 1.0. | public | IntKeyIntChainedHashMap(int capacity, double loadFactor, double growthFactor) Creates a new hash map with a specified capacity,
load factor, and relative growth factor. | public | IntKeyIntChainedHashMap(int capacity, double loadFactor, int growthChunk) Creates a new hash map with a specified capacity,
load factor, and absolute growth factor.
The map capacity increases to capacity()+growthChunk.
This strategy is good for avoiding wasting memory. | public | IntKeyIntChainedHashMap(IntHashFunction keyhash) Creates a new hash map with capacity 11, a relative
growth factor of 1.0, and a load factor of 75%. | public | IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity) Creates a new hash map with a specified capacity, a relative
growth factor of 1.0, and a load factor of 75%. | public | IntKeyIntChainedHashMap(IntHashFunction keyhash, double loadFactor) Creates a new hash map with a capacity of 11, a relative
growth factor of 1.0, and a specified load factor. | public | IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity, double loadFactor) Creates a new hash map with a specified capacity and
load factor, and a relative growth factor of 1.0. | public | IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity, double loadFactor, double growthFactor) Creates a new hash map with a specified capacity,
load factor, and relative growth factor. | public | IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity, double loadFactor, int growthChunk) Creates a new hash map with a specified capacity,
load factor, and absolute growth factor.
The map capacity increases to capacity()+growthChunk.
This strategy is good for avoiding wasting memory. |
DEFAULT_CAPACITY | final public static int DEFAULT_CAPACITY(Code) | | The default capacity of this map.
|
DEFAULT_GROWTH_CHUNK | final public static int DEFAULT_GROWTH_CHUNK(Code) | | The default chunk size with which to increase the capacity of this map.
|
DEFAULT_GROWTH_FACTOR | final public static double DEFAULT_GROWTH_FACTOR(Code) | | The default factor with which to increase the capacity of this map.
|
DEFAULT_LOAD_FACTOR | final public static double DEFAULT_LOAD_FACTOR(Code) | | The default load factor of this map.
|
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap()(Code) | | Creates a new hash map with capacity 11, a relative
growth factor of 1.0, and a load factor of 75%.
|
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(IntKeyIntMap map)(Code) | | Creates a new hash map with the same mappings as a specified map.
Parameters: map - the map whose mappings to put into the new map. throws: NullPointerException - if map is null. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(int capacity)(Code) | | Creates a new hash map with a specified capacity, a relative
growth factor of 1.0, and a load factor of 75%.
Parameters: capacity - the initial capacity of the map. throws: IllegalArgumentException - if capacity is negative. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(double loadFactor)(Code) | | Creates a new hash map with a capacity of 11, a relative
growth factor of 1.0, and a specified load factor.
Parameters: loadFactor - the load factor of the map. throws: IllegalArgumentException - if capacity is negative. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(int capacity, double loadFactor)(Code) | | Creates a new hash map with a specified capacity and
load factor, and a relative growth factor of 1.0.
Parameters: capacity - the initial capacity of the map. Parameters: loadFactor - the load factor of the map. throws: IllegalArgumentException - if capacity is negative;if loadFactor is not positive. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(int capacity, double loadFactor, double growthFactor)(Code) | | Creates a new hash map with a specified capacity,
load factor, and relative growth factor.
The map capacity increases to capacity()*(1+growthFactor).
This strategy is good for avoiding many capacity increases, but
the amount of wasted memory is approximately the size of the map.
Parameters: capacity - the initial capacity of the map. Parameters: loadFactor - the load factor of the map. Parameters: growthFactor - the relative amount with which to increase thethe capacity when a capacity increase is needed. throws: IllegalArgumentException - if capacity is negative;if loadFactor is not positive;if growthFactor is not positive. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(int capacity, double loadFactor, int growthChunk)(Code) | | Creates a new hash map with a specified capacity,
load factor, and absolute growth factor.
The map capacity increases to capacity()+growthChunk.
This strategy is good for avoiding wasting memory. However, an
overhead is potentially introduced by frequent capacity increases.
Parameters: capacity - the initial capacity of the map. Parameters: loadFactor - the load factor of the map. Parameters: growthChunk - the absolute amount with which to increase thethe capacity when a capacity increase is needed. throws: IllegalArgumentException - if capacity is negative;if loadFactor is not positive;if growthChunk is not positive; |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(IntHashFunction keyhash)(Code) | | Creates a new hash map with capacity 11, a relative
growth factor of 1.0, and a load factor of 75%.
Parameters: keyhash - the hash function to use when hashing keys. throws: NullPointerException - if keyhash is null. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity)(Code) | | Creates a new hash map with a specified capacity, a relative
growth factor of 1.0, and a load factor of 75%.
Parameters: keyhash - the hash function to use when hashing keys. Parameters: capacity - the initial capacity of the map. throws: IllegalArgumentException - if capacity is negative. throws: NullPointerException - if keyhash is null. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(IntHashFunction keyhash, double loadFactor)(Code) | | Creates a new hash map with a capacity of 11, a relative
growth factor of 1.0, and a specified load factor.
Parameters: keyhash - the hash function to use when hashing keys. Parameters: loadFactor - the load factor of the map. throws: IllegalArgumentException - if capacity is negative. throws: NullPointerException - if keyhash is null. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity, double loadFactor)(Code) | | Creates a new hash map with a specified capacity and
load factor, and a relative growth factor of 1.0.
Parameters: keyhash - the hash function to use when hashing keys. Parameters: capacity - the initial capacity of the map. Parameters: loadFactor - the load factor of the map. throws: IllegalArgumentException - if capacity is negative;if loadFactor is not positive. throws: NullPointerException - if keyhash is null. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity, double loadFactor, double growthFactor)(Code) | | Creates a new hash map with a specified capacity,
load factor, and relative growth factor.
The map capacity increases to capacity()*(1+growthFactor).
This strategy is good for avoiding many capacity increases, but
the amount of wasted memory is approximately the size of the map.
Parameters: keyhash - the hash function to use when hashing keys. Parameters: capacity - the initial capacity of the map. Parameters: loadFactor - the load factor of the map. Parameters: growthFactor - the relative amount with which to increase thethe capacity when a capacity increase is needed. throws: IllegalArgumentException - if capacity is negative;if loadFactor is not positive;if growthFactor is not positive. throws: NullPointerException - if keyhash is null. |
IntKeyIntChainedHashMap | public IntKeyIntChainedHashMap(IntHashFunction keyhash, int capacity, double loadFactor, int growthChunk)(Code) | | Creates a new hash map with a specified capacity,
load factor, and absolute growth factor.
The map capacity increases to capacity()+growthChunk.
This strategy is good for avoiding wasting memory. However, an
overhead is potentially introduced by frequent capacity increases.
Parameters: keyhash - the hash function to use when hashing keys. Parameters: capacity - the initial capacity of the map. Parameters: loadFactor - the load factor of the map. Parameters: growthChunk - the absolute amount with which to increase thethe capacity when a capacity increase is needed. throws: IllegalArgumentException - if capacity is negative;if loadFactor is not positive;if growthChunk is not positive; throws: NullPointerException - if keyhash is null. |
clear | public void clear()(Code) | | |
clone | public Object clone()(Code) | | Returns a clone of this hash map.
a clone of this hash map. since: 1.1 |
containsKey | public boolean containsKey(int key)(Code) | | |
containsValue | public boolean containsValue(int value)(Code) | | |
get | public int get(int key)(Code) | | |
isEmpty | public boolean isEmpty()(Code) | | |
put | public int put(int key, int value)(Code) | | |
remove | public int remove(int key)(Code) | | |
tget | public int tget(int key)(Code) | | |
|
|