Package com.luciad.util.collections
Class TLcdMapEvent<K,V>
java.lang.Object
java.util.EventObject
com.luciad.util.collections.TLcdMapEvent<K,V>
- All Implemented Interfaces:
Serializable
An event describing a change in an
ILcdMap
.- Since:
- 10.0
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration of the types ofTLcdMapEvent
s -
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionTLcdMapEvent
(ILcdMap<K, V> aMap, TLcdMapEvent.Type aType, K aKey, V aValue, boolean aIsAdjusting) Create a new event describing a change in the mapaMap
. -
Method Summary
Modifier and TypeMethodDescriptiongetKey()
Returns the key of the entry which caused the change in the map:getType()
Returns the type describing the nature of the change.getValue()
Returns the value of the entry which caused the change in the map:boolean
Returnstrue
if more changes will be made to the map immediately after this one,false
otherwise.Methods inherited from class java.util.EventObject
toString
-
Constructor Details
-
TLcdMapEvent
public TLcdMapEvent(ILcdMap<K, V> aMap, TLcdMapEvent.Type aType, K aKey, V aValue, boolean aIsAdjusting) Create a new event describing a change in the mapaMap
.- Parameters:
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
otherwise
-
-
Method Details
-
getType
Returns the type describing the nature of the change.- Returns:
- the type describing the nature of the change.
-
getSource
- Overrides:
getSource
in classEventObject
-
getKey
Returns the key of the entry which caused the change in the map:
- Type ==
ELEMENT_ADDED
: the returned object is the key of the entry that was added to the map. - Type ==
ELEMENT_REMOVED
: the returned object is the key of the entry that was removed from the map.
- Returns:
- the key of the entry which caused the change in the map.
- Type ==
-
getValue
Returns the value of the entry which caused the change in the map:
- Type ==
ELEMENT_ADDED
: the returned object is the value of the entry that was added to the map. - Type ==
ELEMENT_REMOVED
: the returned object is the value of the entry that was removed from the map.
- Returns:
- the value of the entry which caused the change in the map.
- Type ==
-
isAdjusting
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.- Returns:
true
if more changes will be made to the map immediately after this one,false
otherwise.
-