GlueGen v2.6.0-rc-20250712
GlueGen, Native Binding Generator for Java™ (public API).
com.jogamp.common.util.LongLongHashMap Class Reference

Fast HashMap for primitive data. More...

Inheritance diagram for com.jogamp.common.util.LongLongHashMap:
Collaboration diagram for com.jogamp.common.util.LongLongHashMap:

Classes

class  Entry
 An entry mapping a key to a value. More...
 
class  EntryCM
 

Public Member Functions

 LongLongHashMap ()
 
 LongLongHashMap (final int initialCapacity)
 
 LongLongHashMap (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 long value)
 
boolean containsKey (final long key)
 
long get (final long key)
 Returns the value to which the specified key is mapped, or getKeyNotFoundValue if this map contains no mapping for the key. More...
 
long put (final long key, final long value)
 Maps the key to the specified value. More...
 
void putAll (final LongLongHashMap source)
 Copies all of the mappings from the specified map to this map. More...
 
long remove (final long 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< Entryiterator ()
 Returns a new Iterator. More...
 
long setKeyNotFoundValue (final long newKeyNotFoundValue)
 Sets the new key not found value. More...
 
long getKeyNotFoundValue ()
 Returns the value which is returned if no value has been found for the specified key. More...
 
StringBuilder toString (StringBuilder sb)
 
String toString ()
 

Detailed Description

Fast HashMap for primitive data.

Optimized for being GC friendly. Original code is based on the skorpios project released under new BSD license.

Author
Michael Bien
Simon Goller
Sven Gothel
See also
IntObjectHashMap
IntLongHashMap
LongObjectHashMap
IntIntHashMap
LongIntHashMap

Definition at line 61 of file LongLongHashMap.java.

Constructor & Destructor Documentation

◆ LongLongHashMap() [1/3]

com.jogamp.common.util.LongLongHashMap.LongLongHashMap ( )

Definition at line 109 of file LongLongHashMap.java.

◆ LongLongHashMap() [2/3]

com.jogamp.common.util.LongLongHashMap.LongLongHashMap ( final int  initialCapacity)

Definition at line 113 of file LongLongHashMap.java.

◆ LongLongHashMap() [3/3]

com.jogamp.common.util.LongLongHashMap.LongLongHashMap ( final int  initialCapacity,
final float  loadFactor 
)

Definition at line 117 of file LongLongHashMap.java.

Member Function Documentation

◆ capacity()

int com.jogamp.common.util.LongLongHashMap.capacity ( )

Returns the current capacity (buckets) in this map.

Definition at line 331 of file LongLongHashMap.java.

◆ clear()

void com.jogamp.common.util.LongLongHashMap.clear ( )

Clears the entire map.

The size is 0 after this operation.

Definition at line 338 of file LongLongHashMap.java.

◆ clone()

Object com.jogamp.common.util.LongLongHashMap.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.

Parameters
sourcethe primitive hash map to copy

Definition at line 158 of file LongLongHashMap.java.

Here is the call graph for this function:

◆ containsKey()

boolean com.jogamp.common.util.LongLongHashMap.containsKey ( final long  key)

Definition at line 210 of file LongLongHashMap.java.

Here is the call graph for this function:

◆ containsValue()

boolean com.jogamp.common.util.LongLongHashMap.containsValue ( final long  value)

Definition at line 190 of file LongLongHashMap.java.

Here is the call graph for this function:

◆ get()

long com.jogamp.common.util.LongLongHashMap.get ( final long  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 LongLongHashMap.java.

Here is the call graph for this function:

◆ getKeyNotFoundValue()

long com.jogamp.common.util.LongLongHashMap.getKeyNotFoundValue ( )

Returns the value which is returned if no value has been found for the specified key.

See also
get
put

Definition at line 372 of file LongLongHashMap.java.

◆ iterator()

Iterator< Entry > com.jogamp.common.util.LongLongHashMap.iterator ( )

Returns a new Iterator.

Note: this Iterator does not yet support removal of elements.

Definition at line 348 of file LongLongHashMap.java.

Here is the caller graph for this function:

◆ put()

long com.jogamp.common.util.LongLongHashMap.put ( final long  key,
final long  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 LongLongHashMap.java.

Here is the call graph for this function:

◆ putAll()

void com.jogamp.common.util.LongLongHashMap.putAll ( final LongLongHashMap  source)

Copies all of the mappings from the specified map to this map.

Definition at line 285 of file LongLongHashMap.java.

Here is the call graph for this function:

◆ remove()

long com.jogamp.common.util.LongLongHashMap.remove ( final long  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 LongLongHashMap.java.

Here is the call graph for this function:

◆ setKeyNotFoundValue()

long com.jogamp.common.util.LongLongHashMap.setKeyNotFoundValue ( final long  newKeyNotFoundValue)

Sets the new key not found value.

For primitive types (int, long) the default is -1, for Object types, the default is null.

Returns
the previous key not found value
See also
get
put

Definition at line 361 of file LongLongHashMap.java.

◆ size()

int com.jogamp.common.util.LongLongHashMap.size ( )

Returns the current number of key-value mappings in this map.

Definition at line 324 of file LongLongHashMap.java.

◆ toString() [1/2]

String com.jogamp.common.util.LongLongHashMap.toString ( )

Definition at line 397 of file LongLongHashMap.java.

◆ toString() [2/2]

StringBuilder com.jogamp.common.util.LongLongHashMap.toString ( StringBuilder  sb)
Parameters
sbif null, a new StringBuilder is created
Returns
StringBuilder instance with appended string information of this Entry

Definition at line 380 of file LongLongHashMap.java.


The documentation for this class was generated from the following file: