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
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of the types ofTLcdMapEvents -
Field Summary
Fields inherited from class java.util.EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionTLcdMapEvent(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:booleanReturnstrueif more changes will be made to the map immediately after this one,falseotherwise.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-trueif more changes will be made to the map after this change,falseotherwise
-
-
Method Details
-
getType
Returns the type describing the nature of the change.- Returns:
- the type describing the nature of the change.
-
getSource
- Overrides:
getSourcein 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
trueif more changes will be made to the map immediately after this one,falseotherwise.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:
trueif more changes will be made to the map immediately after this one,falseotherwise.
-