public final class CommonTypeUpdateActionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T,S,U extends io.sphere.sdk.commands.UpdateAction<T>> |
buildUpdateAction(S oldObject,
S newObject,
java.util.function.Supplier<U> updateActionSupplier)
Compares two
Object and returns a supplied UpdateAction as a result in an
Optional. |
static <T,S,U extends io.sphere.sdk.commands.UpdateAction<T>> |
buildUpdateActions(S oldObject,
S newObject,
java.util.function.Supplier<java.util.List<U>> updateActionSupplier)
Compares two
Object and returns a supplied list of UpdateAction as a result. |
@Nonnull
public static <T,S,U extends io.sphere.sdk.commands.UpdateAction<T>> java.util.Optional<U> buildUpdateAction(@Nullable
S oldObject,
@Nullable
S newObject,
@Nonnull
java.util.function.Supplier<U> updateActionSupplier)
Object and returns a supplied UpdateAction as a result in an
Optional. If both the Objects have the same values, then no update action is needed and hence an
empty Optional is returned.T - the type of the UpdateActionS - the type of the objects to compareU - certain UpdateAction implementation typeoldObject - the object which should be updatednewObject - the object with the new informationupdateActionSupplier - the supplier that returns the update action to return in the optional@Nonnull
public static <T,S,U extends io.sphere.sdk.commands.UpdateAction<T>> java.util.List<U> buildUpdateActions(@Nullable
S oldObject,
@Nullable
S newObject,
@Nonnull
java.util.function.Supplier<java.util.List<U>> updateActionSupplier)
Object and returns a supplied list of UpdateAction as a result.
If both the Objects have the same values, then no update action is needed
and hence an empty list is returned.T - the type of the UpdateActionS - the type of the objects to compareU - certain UpdateAction implementation typeoldObject - the object which should be updatednewObject - the object with the new informationupdateActionSupplier - the supplier that returns a list of update actions if the objects are different