V - The value type stored in the map.public class IntObjectHashMap<V> extends Object implements IntObjectMap<V>, Iterable<IntObjectMap.Entry<V>>
IntObjectMap that uses open addressing for keys. To minimize
the memory footprint, this class uses open addressing rather than chaining. Collisions are
resolved using double hashing.IntObjectMap.Entry<V>| Constructor and Description |
|---|
IntObjectHashMap() |
IntObjectHashMap(int initialCapacity) |
IntObjectHashMap(int initialCapacity,
float loadFactor) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears all entries from this map.
|
boolean |
containsKey(int key)
Indicates whether or not this map contains a value for the specified key.
|
boolean |
containsValue(V value)
Indicates whether or not the map contains the specified value.
|
Iterable<IntObjectMap.Entry<V>> |
entries()
Gets an iterable collection of the entries contained in this map.
|
V |
get(int key)
Gets the value in the map with the specified key.
|
boolean |
isEmpty()
Indicates whether or not this map is empty (i.e
IntObjectMap.size() == {@code 0]). |
Iterator<IntObjectMap.Entry<V>> |
iterator() |
int[] |
keys()
Gets the keys contained in this map.
|
V |
put(int key,
V value)
Puts the given entry into the map.
|
void |
putAll(IntObjectMap<V> sourceMap)
Puts all of the entries from the given map into this map.
|
V |
remove(int key)
Removes the entry with the specified key.
|
int |
size()
Returns the number of entries contained in this map.
|
V[] |
values(Class<V> clazz)
Gets the values contained in this map.
|
public IntObjectHashMap()
public IntObjectHashMap(int initialCapacity)
public IntObjectHashMap(int initialCapacity,
float loadFactor)
public V get(int key)
IntObjectMapget in interface IntObjectMap<V>key - the key whose associated value is to be returned.null if the key was not found in the map.public V put(int key, V value)
IntObjectMapput in interface IntObjectMap<V>key - the key of the entry.value - the value of the entry.null if there was no previous mapping.public void putAll(IntObjectMap<V> sourceMap)
IntObjectMapputAll in interface IntObjectMap<V>public V remove(int key)
IntObjectMapremove in interface IntObjectMap<V>key - the key for the entry to be removed from this map.null if there was no mapping.public int size()
IntObjectMapsize in interface IntObjectMap<V>public boolean isEmpty()
IntObjectMapIntObjectMap.size() == {@code 0]).isEmpty in interface IntObjectMap<V>public void clear()
IntObjectMapclear in interface IntObjectMap<V>public boolean containsKey(int key)
IntObjectMapcontainsKey in interface IntObjectMap<V>public boolean containsValue(V value)
IntObjectMapcontainsValue in interface IntObjectMap<V>public Iterable<IntObjectMap.Entry<V>> entries()
IntObjectMapentries in interface IntObjectMap<V>public Iterator<IntObjectMap.Entry<V>> iterator()
iterator in interface Iterable<IntObjectMap.Entry<V>>public int[] keys()
IntObjectMapkeys in interface IntObjectMap<V>public V[] values(Class<V> clazz)
IntObjectMapvalues in interface IntObjectMap<V>Copyright © 2008–2014 The Netty Project. All rights reserved.