LongToObjectHashMap

A variant on java.util.HashMap<K, V> that uses primitive long ints for map keys instead of autoboxed Long objects like would be used for a Map<Long, V>.

Since

1.0.0-pre

Parameters

<V>

the type of the values stored in the map

Constructors

Link copied to clipboard
constructor()
Default constructor.

Types

Link copied to clipboard
Interface for map iterator function.

Functions

Link copied to clipboard
open fun capacity(): Int
Gets the current capacity of the map.
Link copied to clipboard
open fun clear()
Clears and removes all entries from the map.
Link copied to clipboard
open fun containsKey(key: Long): Boolean
Checks if a key is contained in the map.
Link copied to clipboard
Iterates over every key-value pair in the map and passes them to the given function.
Link copied to clipboard
open fun get(key: Long): V
Gets the value associated with the given key.
Link copied to clipboard
open fun isEmpty(): Boolean
Checks if the map contains any entries.
Link copied to clipboard
Gets the keys contained in the map.
Link copied to clipboard
open fun put(key: Long, value: V): V
Puts a value value corresponding to key key in the map.
Link copied to clipboard
open fun remove(key: Long): V
Removes the value associated with the given key and returns it.
Link copied to clipboard
open fun size(): Int
Gets the number of key-value pairs currently contained in the map.
Link copied to clipboard
open fun values(): Collection<V>
Gets the values contained in the map.