HashMap<K, V> interface
Hash map version of the Map interface. A HashMap does not
provide any guarantees on the order of keys and values in getKeys
and getValues
.
interface HashMap<K, V> extends Map<K, V> default HashMapImplementation<K, V> { /** * Creates a map with the default implementation. */ HashMap(); /** * Creates a [HashMap] that contains all key value pairs of [other]. */ HashMap.from(Map<K, V> other); }
Default class
Extends
Subinterfaces
Implemented by
Constructors
new HashMap() #
Creates a map with the default implementation.
HashMap();
Properties
Operators
Methods
bool containsKey(K key) #
Returns whether this map contains the given key.
bool containsKey(K key);
bool containsValue(V value) #
Returns whether this map contains the given value.
bool containsValue(V value);
void forEach(void f(K key, V value)) #
Applies f to each {key, value} pair of the map.
void forEach(void f(K key, V value));
Collection<K> getKeys() #
Returns a collection containing all the keys in the map.
Collection<K> getKeys();
Collection<V> getValues() #
Returns a collection containing all the values in the map.
Collection<V> getValues();
bool isEmpty() #
Returns true if there is no {key, value} pair in the map.
bool isEmpty();