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
Represents a change from some old value to a new one.
primarily used in salt for showing package changes
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionthe new valuethe old value<R> Change<R> Applies a mapping function to both the old and the new value, wrapping the result in a new Change.
-
Field Details
-
oldValue
-
newValue
-
-
Constructor Details
-
Change
constructor- Parameters:
oldValue- old valuenewValue- new value
-
-
Method Details
-
getOldValue
the old value- Returns:
- old value
-
getNewValue
the new value- Returns:
- new value
-
map
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
-