Package com.vaadin.collaborationengine
Class ListChangeEvent
java.lang.Object
java.util.EventObject
com.vaadin.collaborationengine.ListChangeEvent
- All Implemented Interfaces:
Serializable
Event that is fired when the value in a collaboration list changes.
- Since:
- 3.1
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source -
Method Summary
Modifier and TypeMethodDescriptiongetKey()Gets the key of the list item affected by the change.getNext()Gets the key of the item which is after the current item after the change.Gets the key of the item which was after the current item before the change.Gets the key of the item which was before the current item before the change.<T> TgetOldValue(Class<T> type) Gets the old value of the list item affected by the change as instance of the given class.<T> TgetOldValue(tools.jackson.core.type.TypeReference<T> type) Gets the old value of the list item affected by the change as instance corresponding to the given type reference.getPrev()Gets the key of the item which is before the current item after the change.<T> TGets the current value of the list item affected by the change as instance of the given class.<T> TgetValue(tools.jackson.core.type.TypeReference<T> type) Gets the current value of the list item affected by the change as instance corresponding to the given type reference.Methods inherited from class java.util.EventObject
toString
-
Method Details
-
getSource
- Overrides:
getSourcein classEventObject
-
getKey
Gets the key of the list item affected by the change.- Returns:
- the key of the changed item, not
null
-
getValue
Gets the current value of the list item affected by the change as instance of the given class.If the item was removed by the change, this method returns
nullandgetOldValue(Class)return the removed item value.- Type Parameters:
T- the type of the value fromtypeparameter, e.g.String- Parameters:
type- the expected type of the returned instance- Returns:
- the current value of the item affected by the change
-
getValue
public <T> T getValue(tools.jackson.core.type.TypeReference<T> type) Gets the current value of the list item affected by the change as instance corresponding to the given type reference.If the item was removed by the change, this method returns
nullandgetOldValue(TypeReference)return the removed item value.- Type Parameters:
T- the type reference of the value fromtypeparameter, e.g.List- Parameters:
type- the expected type reference of the returned instance- Returns:
- the current value of the item affected by the change
-
getOldValue
Gets the old value of the list item affected by the change as instance of the given class.- Type Parameters:
T- the type of the value fromtypeparameter, e.g.String- Parameters:
type- the expected type of the returned instance- Returns:
- the old value of the item affected by the change
-
getOldValue
public <T> T getOldValue(tools.jackson.core.type.TypeReference<T> type) Gets the old value of the list item affected by the change as instance corresponding to the given type reference.- Type Parameters:
T- the type reference of the value fromtypeparameter, e.g.List- Parameters:
type- the expected type reference of the returned instance- Returns:
- the old value of the item affected by the change
-
getNext
Gets the key of the item which is after the current item after the change.- Returns:
- the key of the item which is after the current item, or
nullif there is none
-
getOldNext
Gets the key of the item which was after the current item before the change.- Returns:
- the key of the item which was after the current item, or
nullif there was none
-
getPrev
Gets the key of the item which is before the current item after the change.- Returns:
- the key of the item which is before the current item, or
nullif there is none
-
getOldPrev
Gets the key of the item which was before the current item before the change.- Returns:
- the key of the item which was before the current item, or
nullif there was none
-