public interface ILcdMap<K,V> extends Map<K,V>
An extension of the Java Map
which fires an TLcdMapEvent
for every entry that is added to or removed
from the map.
Due to those events, there is a decrease in performance compared to the traditional
Map
when adding and/or removing multiple entries at once (e.g. Map.putAll(java.util.Map)
or Map.clear()
). For every entry
that is added or removed, those methods should fire an individual event.
TLcdMapEvent
,
ILcdMapListener
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 |
removeMapListener(ILcdMapListener<K,V> aMapListener)
Unregister the listener
aMapListener so it will no longer be informed
about changes in this map. |
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
void addMapListener(ILcdMapListener<K,V> aMapListener)
Register the listener aMapListener
to be informed about changes in this
map.
aMapListener
- the listenerremoveMapListener(ILcdMapListener)
void removeMapListener(ILcdMapListener<K,V> aMapListener)
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.
aMapListener
- the listeneraddMapListener(ILcdMapListener)