T
- type of the changed valuepublic class Change<T>
extends java.lang.Object
Constructor and Description |
---|
Change(T oldValue,
T newValue)
constructor
|
Modifier and Type | Method and Description |
---|---|
T |
getNewValue()
the new value
|
T |
getOldValue()
the old value
|
<R> Change<R> |
map(java.util.function.Function<T,R> fn)
Applies a mapping function to both the old and the new value, wrapping the result
in a new Change.
|
@SerializedName(value="old") private final T oldValue
@SerializedName(value="new") private final T newValue
public T getOldValue()
public T getNewValue()
public <R> Change<R> map(java.util.function.Function<T,R> fn)
R
- type returned by the mapping functionfn
- the mapping function