Class IntMap<T>
java.lang.Object
org.jboss.marshalling.util.IntMap<T>
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIntMap()Construct a new instance with an initial capacity of 64 and a load factor of0.5.IntMap(float loadFactor) Construct a new instance with the given load factor and an initial capacity of 64.IntMap(int initialCapacity) Construct a new instance with the given initial capacity and a load factor of0.5.IntMap(int initialCapacity, float loadFactor) Construct a new instance with the given initial capacity and load factor. -
Method Summary
-
Field Details
-
values
private int[] values -
keys
-
count
private int count -
resizeCount
private int resizeCount
-
-
Constructor Details
-
IntMap
public IntMap(int initialCapacity, float loadFactor) Construct a new instance with the given initial capacity and load factor.- Parameters:
initialCapacity- the initial capacityloadFactor- the load factor
-
IntMap
public IntMap(float loadFactor) Construct a new instance with the given load factor and an initial capacity of 64.- Parameters:
loadFactor- the load factor
-
IntMap
public IntMap(int initialCapacity) Construct a new instance with the given initial capacity and a load factor of0.5.- Parameters:
initialCapacity- the initial capacity
-
IntMap
public IntMap()Construct a new instance with an initial capacity of 64 and a load factor of0.5.
-
-
Method Details
-
clone
-
get
Get a value from the map.- Parameters:
key- the keydefVal- the value to return if the key is not found- Returns:
- the map value at the given key, or the value of
defValif it's not found
-
put
Put a value into the map. Any previous mapping is discarded silently.- Parameters:
key- the keyvalue- the value to store
-
resize
private void resize() -
clear
public void clear() -
toString
-