Constructor and Description |
---|
TLcdHashMap()
Constructs an empty map with an initial capacity of ten.
|
TLcdHashMap(int aInitialCapacity)
Constructs an empty map with the specified initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
addMapListener(ILcdMapListener<K,V> aMapListener)
Register the listener
aMapListener to be informed about changes in this
map. |
void |
clear() |
Object |
clone()
Returns a shallow copy of this
TLcdHashMap instance. |
boolean |
containsKey(Object aKey) |
boolean |
containsValue(Object aValue) |
Set<Map.Entry<K,V>> |
entrySet() |
boolean |
equals(Object aObject) |
V |
get(Object aKey) |
int |
hashCode() |
boolean |
isEmpty() |
Set<K> |
keySet() |
V |
put(K aKey,
V aValue) |
void |
putAll(Map<? extends K,? extends V> aMap) |
V |
remove(Object aKey) |
void |
removeMapListener(ILcdMapListener<K,V> aMapListener)
Unregister the listener
aMapListener so it will no longer be informed
about changes in this map. |
int |
size() |
Collection<V> |
values() |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public TLcdHashMap()
public TLcdHashMap(int aInitialCapacity)
aInitialCapacity
- the initial capacity of the mapIllegalArgumentException
- if the specified initical capacity is negativepublic boolean containsKey(Object aKey)
containsKey
in interface Map<K,V>
public boolean containsValue(Object aValue)
containsValue
in interface Map<K,V>
public boolean equals(Object aObject)
public int hashCode()
public void addMapListener(ILcdMapListener<K,V> aMapListener)
ILcdMap
Register the listener aMapListener
to be informed about changes in this
map.
addMapListener
in interface ILcdMap<K,V>
aMapListener
- the listenerILcdMap.removeMapListener(ILcdMapListener)
public void removeMapListener(ILcdMapListener<K,V> aMapListener)
ILcdMap
Unregister the listener aMapListener
so it will no longer be informed
about changes in this map.
This method should do nothing when addMapListener
was not registered
previously.
removeMapListener
in interface ILcdMap<K,V>
aMapListener
- the listenerILcdMap.addMapListener(ILcdMapListener)