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