public class LongHashMap<V> extends java.lang.Object implements ILongHashMap<V>
Constructor and Description |
---|
LongHashMap(int maxCapacity)
Constructs an empty map with the specified max capacity
|
LongHashMap(int maxCapacity,
java.lang.Class<?> genericTypeParameterValue)
Constructs an empty map with the specified max capacity.
|
Modifier and Type | Method and Description |
---|---|
int |
capacity()
Returns the map capacity
|
void |
clear()
Clears the contents.
|
boolean |
containsKey(long key)
Returns true if the given key exists
|
LongEntry<V> |
containsValue(V value)
Returns the key/value pair, if the given value exists, otherwise returns null
|
LongEntry<V>[] |
entries()
Returns the set of key/value entries contained
|
V |
get(long key)
Returns the value associated with a key, or null if no such key exists
|
boolean |
isEmpty()
Returns true if the map is empty
|
long[] |
keySet()
Returns all keys
|
V |
put(long key,
V value)
Puts the given key in the map, returning any previously associated value of the given key
|
void |
resize(int capacity)
Resizes the hash map.
|
int |
size()
Returns the number of key/value pairs
|
V[] |
values()
Returns all values
|
public LongHashMap(int maxCapacity)
java.lang.NullPointerException
- An argument is nulljava.lang.IllegalArgumentException
- An argument is invalidSuperTypeTokenException
- When called without using anonymous class semantics.public LongHashMap(int maxCapacity, java.lang.Class<?> genericTypeParameterValue)
java.lang.NullPointerException
- An argument is nulljava.lang.IllegalArgumentException
- An argument is invalidpublic void clear()
public V put(long key, V value)
put
in interface ILongHashMap<V>
public boolean containsKey(long key)
containsKey
in interface ILongHashMap<V>
public LongEntry<V> containsValue(V value)
containsValue
in interface ILongHashMap<V>
public LongEntry<V>[] entries()
entries
in interface ILongHashMap<V>
public V get(long key)
get
in interface ILongHashMap<V>
public boolean isEmpty()
isEmpty
in interface ILongHashMap<V>
public V[] values()
values
in interface ILongHashMap<V>
public long[] keySet()
keySet
in interface ILongHashMap<V>
public int size()
size
in interface ILongHashMap<V>
public int capacity()
capacity
in interface ILongHashMap<V>
public void resize(int capacity)