com.vaadin.collaborationengine.
Class ListChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.collaborationengine.ListChangeEvent
-
All Implemented Interfaces:
public class ListChangeEvent extends EventObject
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
All Methods Modifier and Type Method and Description <T> Optional<T>
getAddedItem(Class<T> type)
Deprecated.
This method is preserved for backwards compatibility from the initial version when the only possible list change was to add a new item to the end of the list.<T> Optional<T>
getAddedItem(com.fasterxml.jackson.core.type.TypeReference<T> type)
Deprecated.
This method is preserved for backwards compatibility from the initial version when the only possible list change was to add a new item to the end of the list.<T> T
getOldValue(Class<T> type)
Gets the old value of the list item affected by the change as instance of the given class.
<T> T
getOldValue(com.fasterxml.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.
CollaborationList
getSource()
<T> T
getValue(Class<T> type)
Gets the current value of the list item affected by the change as instance of the given class.
<T> T
getValue(com.fasterxml.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 Detail
-
getSource
public CollaborationList getSource()
Overrides:
getSource
in classEventObject
-
getValue
public <T> T getValue(Class<T> type)
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
null
andgetOldValue(Class)
return the removed item value.Type Parameters:
T
- the type of the value fromtype
parameter, e.g.String
Parameters:
type
- the expected type of the returned instanceReturns:
the current value of the item affected by the change
-
getValue
public <T> T getValue(com.fasterxml.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
null
andgetOldValue(TypeReference)
return the removed item value.Type Parameters:
T
- the type reference of the value fromtype
parameter, e.g.List
Parameters:
type
- the expected type reference of the returned instanceReturns:
the current value of the item affected by the change
-
getOldValue
public <T> T getOldValue(Class<T> type)
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 fromtype
parameter, e.g.String
Parameters:
type
- the expected type of the returned instanceReturns:
the old value of the item affected by the change
-
getOldValue
public <T> T getOldValue(com.fasterxml.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 fromtype
parameter, e.g.List
Parameters:
type
- the expected type reference of the returned instanceReturns:
the old value of the item affected by the change
-
getAddedItem
@Deprecated public <T> Optional<T> getAddedItem(Class<T> type)
Deprecated. This method is preserved for backwards compatibility from the initial version when the only possible list change was to add a new item to the end of the list.
Gets the added item as instance of the given class.
Type Parameters:
T
- the type of the class given as thetype
argumentParameters:
type
- the class of the expected type of the returned instanceReturns:
the added item, or an empty optional if no item was added
-
getAddedItem
@Deprecated public <T> Optional<T> getAddedItem(com.fasterxml.jackson.core.type.TypeReference<T> type)
Deprecated. This method is preserved for backwards compatibility from the initial version when the only possible list change was to add a new item to the end of the list.
Gets the added item as instance of the given type reference.
Type Parameters:
T
- the type of the reference given as thetype
argumentParameters:
type
- the expected type reference of the returned instanceReturns:
the added item, or an empty optional if no item was added
-
-