public class TLcdMapEvent<K,V> extends EventObject
ILcdMap
.ILcdMapListener
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
TLcdMapEvent.Type
Enumeration of the types of
TLcdMapEvent s |
source
Constructor and Description |
---|
TLcdMapEvent(ILcdMap<K,V> aMap,
TLcdMapEvent.Type aType,
K aKey,
V aValue,
boolean aIsAdjusting)
Create a new event describing a change in the map
aMap . |
Modifier and Type | Method and Description |
---|---|
K |
getKey()
Returns the key of the entry which caused the change in the map:
|
ILcdMap<K,V> |
getSource() |
TLcdMapEvent.Type |
getType()
Returns the type describing the nature of the change.
|
V |
getValue()
Returns the value of the entry which caused the change in the map:
|
boolean |
isAdjusting()
Returns
true if more changes will be made to the map immediately after this
one, false otherwise. |
toString
public TLcdMapEvent(ILcdMap<K,V> aMap, TLcdMapEvent.Type aType, K aKey, V aValue, boolean aIsAdjusting)
aMap
.aMap
- The map in which the change occurred.aType
- The type describing the nature of the change.aKey
- The map key which caused the change.aValue
- The map value which caused the change.aIsAdjusting
- true
if more changes will be made to the map after this
change, false
otherwisepublic TLcdMapEvent.Type getType()
public ILcdMap<K,V> getSource()
getSource
in class EventObject
public K getKey()
Returns the key of the entry which caused the change in the map:
ELEMENT_ADDED
: the returned object is the key of the entry that
was added to the map.ELEMENT_REMOVED
: the returned object is the key of the entry that
was removed from the map.public V getValue()
Returns the value of the entry which caused the change in the map:
ELEMENT_ADDED
: the returned object is the value of the entry that
was added to the map.ELEMENT_REMOVED
: the returned object is the value of the entry that
was removed from the map.public boolean isAdjusting()
Returns true
if more changes will be made to the map immediately after this
one, false
otherwise.
When for example using Map.putAll(java.util.Map)
events will be fired for every entry added to the map. In this case this property should be true
for all events except the one of the last inserted entry.
true
if more changes will be made to the map immediately after this
one, false
otherwise.