@FunctionalInterface public interface MapEventListener<K,V>
Modifier and Type | Method and Description |
---|---|
default void |
onInsert(@NotNull String assetFullName,
K key,
V value)
This method is invoked when an existing entry in a Map is changed.
|
default void |
onRemove(@NotNull String assetFullName,
K key,
V value)
This method is invoked when an existing entry in a Map is removed.
|
void |
onUpdate(@NotNull String assetFullName,
K key,
V oldValue,
V newValue)
This method is invoked when an existing entry in a Map is changed.
|
void onUpdate(@NotNull @NotNull String assetFullName, @NotNull K key, @Nullable V oldValue, @Nullable V newValue)
By default, this method is invoked by onInsert(String, Object, Object)
and onRemove(String, Object, Object)
if not specific implementations
are supplied for them. In this case, the oldValue
and newValue
may
be null
.
assetFullName
- full name of the asset to which the map belongskey
- of the existing entry that changedoldValue
- of the existing entry that changednewValue
- of the existing entry that changeddefault void onInsert(@NotNull @NotNull String assetFullName, @NotNull K key, @NotNull V value)
assetFullName
- full name of the asset to which the map belongskey
- of the newly inserted entryvalue
- of the newly inserted entrydefault void onRemove(@NotNull @NotNull String assetFullName, @NotNull K key, @NotNull V value)
assetFullName
- full name of the asset to which the map belongskey
- of the newly removed entryvalue
- of the newly removed entryCopyright © 2021. All rights reserved.