|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cm.osm2po.sd.primitives.IntTHashMap<T>
T
- Generic Type.public class IntTHashMap<T>
This is a Hashmap for Java-Objects as value
with a primitive int as key.
Important:
rehash()
will not be triggered automatically.
Statistics can be examined by getHashPopulation()
,
getHashSize()
, getSize()
and getMaxCollisions()
.
Constructor Summary | |
---|---|
IntTHashMap(int capacity)
|
Method Summary | |
---|---|
void |
clear()
|
boolean |
contains(int key)
|
T |
get(int key)
Returns a value for a key. |
int |
getHashPopulation()
|
int |
getHashSize()
|
int |
getMaxCollisions()
|
int |
getSize()
|
java.util.Iterator<T> |
iterator()
|
void |
put(int key,
T value)
Adds a new key/value. |
void |
rehash()
Increases the Hash by factor 2. |
T |
remove(int key)
Removes an element. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntTHashMap(int capacity)
capacity
- Initially expected number of elements.
Method Detail |
---|
public void clear()
public int getSize()
public int getHashSize()
public int getMaxCollisions()
put(int, Object)
or rehash()
.
For performance reasons not after remove(int)
.public int getHashPopulation()
public void put(int key, T value)
key
- intvalue
- Object Tpublic T remove(int key)
key
- int
public boolean contains(int key)
key
- int
public T get(int key)
key
- int
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public void rehash()
public java.lang.String toString()
toString
in class java.lang.Object
|
osm2po-sd-5.0.0 (c) December 24 2014 Carsten Moeller - info@osm2po.de | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |