K - key typeV - value typepublic class MapEvent<K,V> extends AbstractEvent<MapEvent.Type,K>
| Modifier and Type | Class and Description |
|---|---|
static class |
MapEvent.Type
MapEvent type.
|
| Constructor and Description |
|---|
MapEvent(MapEvent.Type type,
K key,
V currentValue,
V previousValue)
Creates a new event object.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
hashCode() |
K |
key()
Returns the key this event concerns.
|
V |
newValue()
Returns the new value in the map associated with the key.
|
V |
oldValue()
Returns the value associated with the key, before it was updated.
|
String |
toString() |
subject, time, typepublic MapEvent(MapEvent.Type type, K key, V currentValue, V previousValue)
type - event typekey - key the event concernscurrentValue - new value key is mapped topreviousValue - value that was replacedpublic K key()
public V newValue()
AbstractEvent.type() returns REMOVE,
this method will return null.public V oldValue()
public String toString()
toString in class AbstractEvent<MapEvent.Type,K>Copyright © 2013–2018. All rights reserved.