| java.lang.Object net.sf.saxon.sort.IntHashMap
IntHashMap | public class IntHashMap implements Serializable(Code) | | A hash table that maps int keys to Object values.
author: Dave Hale, Landmark Graphics author: Dominique Devienne author: Michael Kay: retrofitted to JDK 1.4, added iterator(), modified to disallow null values |
Constructor Summary | |
public | IntHashMap() Initializes a map with a capacity of 8 and a load factor of 0,25. | public | IntHashMap(int capacity) Initializes a map with the given capacity and a load factor of 0,25. | public | IntHashMap(int capacity, double factor) Constructs a new map with initial capacity, and load factor.
The capacity is the number of keys that can be mapped without resizing
the arrays in which keys and values are stored. |
IntHashMap | public IntHashMap()(Code) | | Initializes a map with a capacity of 8 and a load factor of 0,25.
|
IntHashMap | public IntHashMap(int capacity)(Code) | | Initializes a map with the given capacity and a load factor of 0,25.
Parameters: capacity - the initial capacity. |
IntHashMap | public IntHashMap(int capacity, double factor)(Code) | | Constructs a new map with initial capacity, and load factor.
The capacity is the number of keys that can be mapped without resizing
the arrays in which keys and values are stored. For efficiency, only
a fraction of the elements in those arrays are used. That fraction is
the specified load factor. The initial length of the arrays equals the
smallest power of two not less than the ratio capacity/factor. The
capacity of the map is increased, as necessary. The maximum number
of keys that can be mapped is 2^30.
Parameters: capacity - the initial capacity. Parameters: factor - the load factor. |
clear | public void clear()(Code) | | Clears the map.
|
get | public Object get(int key)(Code) | | Gets the value for this key.
Parameters: key - Key the value, null if not found. |
put | public void put(int key, Object value)(Code) | | Adds a key-value pair to the map.
Parameters: key - Key Parameters: value - Value |
remove | public boolean remove(int key)(Code) | | Removes a key from the map.
Parameters: key - Key to remove true if the value was removed |
size | public int size()(Code) | | Gets the size of the map.
the size (the number of entries in the map) |
valueIterator | public Iterator valueIterator()(Code) | | Get an iterator over the values
|
|
|