|
GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java (public API).
|
Fast HashMap for primitive data. More...
Classes | |
| class | Entry |
| An entry mapping a key to a value. More... | |
| class | EntryCM |
Public Member Functions | |
| IntObjectHashMap () | |
| IntObjectHashMap (final int initialCapacity) | |
| IntObjectHashMap (final int initialCapacity, final float loadFactor) | |
| Object | clone () |
Disclaimer: If the value type doesn't implement clone(), only the reference is copied. More... | |
| boolean | containsValue (final Object value) |
| boolean | containsKey (final int key) |
| Object | get (final int key) |
Returns the value to which the specified key is mapped, or getKeyNotFoundValue if this map contains no mapping for the key. More... | |
| Object | put (final int key, final Object value) |
| Maps the key to the specified value. More... | |
| void | putAll (final IntObjectHashMap source) |
| Copies all of the mappings from the specified map to this map. More... | |
| Object | remove (final int key) |
| Removes the key-value mapping from this map. More... | |
| int | size () |
| Returns the current number of key-value mappings in this map. More... | |
| int | capacity () |
| Returns the current capacity (buckets) in this map. More... | |
| void | clear () |
| Clears the entire map. More... | |
| Iterator< Entry > | iterator () |
Returns a new Iterator. More... | |
| Object | setKeyNotFoundValue (final Object newKeyNotFoundValue) |
| Sets the new key not found value. More... | |
| Object | getKeyNotFoundValue () |
| Returns the value which is returned if no value has been found for the specified key. More... | |
| StringBuilder | toString (StringBuilder sb) |
| String | toString () |
Fast HashMap for primitive data.
Optimized for being GC friendly. Original code is based on the skorpios project released under new BSD license.
Definition at line 61 of file IntObjectHashMap.java.
| com.jogamp.common.util.IntObjectHashMap.IntObjectHashMap | ( | ) |
Definition at line 109 of file IntObjectHashMap.java.
| com.jogamp.common.util.IntObjectHashMap.IntObjectHashMap | ( | final int | initialCapacity | ) |
Definition at line 113 of file IntObjectHashMap.java.
| com.jogamp.common.util.IntObjectHashMap.IntObjectHashMap | ( | final int | initialCapacity, |
| final float | loadFactor | ||
| ) |
Definition at line 117 of file IntObjectHashMap.java.
| int com.jogamp.common.util.IntObjectHashMap.capacity | ( | ) |
Returns the current capacity (buckets) in this map.
Definition at line 331 of file IntObjectHashMap.java.
| void com.jogamp.common.util.IntObjectHashMap.clear | ( | ) |
Clears the entire map.
The size is 0 after this operation.
Definition at line 338 of file IntObjectHashMap.java.
| Object com.jogamp.common.util.IntObjectHashMap.clone | ( | ) |
Disclaimer: If the value type doesn't implement clone(), only the reference is copied.
Note: Due to private fields we cannot implement a copy constructor, sorry.
| source | the primitive hash map to copy |
Definition at line 158 of file IntObjectHashMap.java.
| boolean com.jogamp.common.util.IntObjectHashMap.containsKey | ( | final int | key | ) |
| boolean com.jogamp.common.util.IntObjectHashMap.containsValue | ( | final Object | value | ) |
Definition at line 190 of file IntObjectHashMap.java.
| Object com.jogamp.common.util.IntObjectHashMap.get | ( | final int | key | ) |
Returns the value to which the specified key is mapped, or getKeyNotFoundValue if this map contains no mapping for the key.
Definition at line 226 of file IntObjectHashMap.java.
| Object com.jogamp.common.util.IntObjectHashMap.getKeyNotFoundValue | ( | ) |
Returns the value which is returned if no value has been found for the specified key.
Definition at line 372 of file IntObjectHashMap.java.
| Iterator< Entry > com.jogamp.common.util.IntObjectHashMap.iterator | ( | ) |
Returns a new Iterator.
Note: this Iterator does not yet support removal of elements.
Definition at line 348 of file IntObjectHashMap.java.
| Object com.jogamp.common.util.IntObjectHashMap.put | ( | final int | key, |
| final Object | value | ||
| ) |
Maps the key to the specified value.
If a mapping to this key already exists, the previous value will be returned (otherwise getKeyNotFoundValue).
Definition at line 242 of file IntObjectHashMap.java.
| void com.jogamp.common.util.IntObjectHashMap.putAll | ( | final IntObjectHashMap | source | ) |
Copies all of the mappings from the specified map to this map.
Definition at line 285 of file IntObjectHashMap.java.
| Object com.jogamp.common.util.IntObjectHashMap.remove | ( | final int | key | ) |
Removes the key-value mapping from this map.
Returns the previously mapped value or getKeyNotFoundValue if no such mapping exists.
Definition at line 298 of file IntObjectHashMap.java.
| Object com.jogamp.common.util.IntObjectHashMap.setKeyNotFoundValue | ( | final Object | newKeyNotFoundValue | ) |
Sets the new key not found value.
For primitive types (int, long) the default is -1, for Object types, the default is null.
Definition at line 361 of file IntObjectHashMap.java.
| int com.jogamp.common.util.IntObjectHashMap.size | ( | ) |
Returns the current number of key-value mappings in this map.
Definition at line 324 of file IntObjectHashMap.java.
| String com.jogamp.common.util.IntObjectHashMap.toString | ( | ) |
Definition at line 397 of file IntObjectHashMap.java.
| StringBuilder com.jogamp.common.util.IntObjectHashMap.toString | ( | StringBuilder | sb | ) |
| sb | if null, a new StringBuilder is created |
Definition at line 380 of file IntObjectHashMap.java.