public class UnsortedTableMap<K,V> extends AbstractMap<K,V>
AbstractMap.MapEntry<K,V>
Constructor and Description |
---|
UnsortedTableMap()
Constructs an initially empty map.
|
Modifier and Type | Method and Description |
---|---|
Iterable<Entry<K,V>> |
entrySet()
Returns an iterable collection of all key-value entries of the map.
|
V |
get(K key)
Returns the value associated with the specified key, or null if no such entry exists.
|
V |
put(K key,
V value)
Associates the given value with the given key.
|
V |
remove(K key)
Removes the entry with the specified key, if present, and returns its value.
|
int |
size()
Returns the number of entries in the map.
|
isEmpty, keySet, values
public int size()
public V get(K key)
key
- the key whose associated value is to be returnedpublic V put(K key, V value)
key
- key with which the specified value is to be associatedvalue
- value to be associated with the specified keypublic V remove(K key)
key
- the key whose entry is to be removed from the map