|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jogamp.common.util.IntLongHashMap
public class IntLongHashMap
Fast HashMap for primitive data. Optimized for being GC friendly. Original code is based on the skorpios project released under new BSD license.
IntObjectHashMap
,
IntIntHashMap
,
LongObjectHashMap
,
LongLongHashMap
,
LongIntHashMap
Nested Class Summary | |
---|---|
static class |
IntLongHashMap.Entry
An entry mapping a key to a value. |
Constructor Summary | |
---|---|
IntLongHashMap()
|
|
IntLongHashMap(int initialCapacity)
|
|
IntLongHashMap(int initialCapacity,
float loadFactor)
|
Method Summary | |
---|---|
int |
capacity()
Returns the current capacity (buckets) in this map. |
void |
clear()
Clears the entire map. |
Object |
clone()
Disclaimer: If the value type doesn't implement clone() , only the reference is copied. |
boolean |
containsKey(int key)
|
boolean |
containsValue(long value)
|
long |
get(int key)
Returns the value to which the specified key is mapped, or getKeyNotFoundValue() if this map contains no mapping for the key. |
long |
getKeyNotFoundValue()
Returns the value which is returned if no value has been found for the specified key. |
Iterator<IntLongHashMap.Entry> |
iterator()
Returns a new Iterator . |
long |
put(int key,
long value)
Maps the key to the specified value. |
void |
putAll(IntLongHashMap source)
Copies all of the mappings from the specified map to this map. |
long |
remove(int key)
Removes the key-value mapping from this map. |
long |
setKeyNotFoundValue(long newKeyNotFoundValue)
Sets the new key not found value. |
int |
size()
Returns the current number of key-value mappings in this map. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IntLongHashMap()
public IntLongHashMap(int initialCapacity)
public IntLongHashMap(int initialCapacity, float loadFactor)
Method Detail |
---|
public Object clone()
clone()
, only the reference is copied.
Note: Due to private fields we cannot implement a copy constructor, sorry.
clone
in class Object
source
- the primitive hash map to copypublic boolean containsValue(long value)
public boolean containsKey(int key)
public long get(int key)
getKeyNotFoundValue()
if this map contains no mapping for the key.
public long put(int key, long value)
getKeyNotFoundValue()
).
public void putAll(IntLongHashMap source)
public long remove(int key)
getKeyNotFoundValue()
if no such mapping exists.
public int size()
public int capacity()
public void clear()
public Iterator<IntLongHashMap.Entry> iterator()
Iterator
.
Note: this Iterator does not yet support removal of elements.
iterator
in interface Iterable
public long setKeyNotFoundValue(long newKeyNotFoundValue)
get(int)
,
put(int, long)
public long getKeyNotFoundValue()
get(int)
,
put(int, long)
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |