Package com.suse.salt.netapi.results
Class Change<T>
- java.lang.Object
-
- com.suse.salt.netapi.results.Change<T>
-
- Type Parameters:
T
- type of the changed value
public class Change<T> extends java.lang.Object
Represents a change from some old value to a new one. primarily used in salt for showing package changes
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getNewValue()
the new valueT
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.
-
-
-
Method Detail
-
getOldValue
public T getOldValue()
the old value- Returns:
- old value
-
getNewValue
public T getNewValue()
the new value- Returns:
- new value
-
map
public <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.- Type Parameters:
R
- type returned by the mapping function- Parameters:
fn
- the mapping function- Returns:
- a new Change with mapped values
-
-