Interface Apply.ResultErrorSafe<T,V,E extends Throwable>

Type Parameters:
T - the type of data you enter as a parameter
V - the result generated when called
E - the type of error when the interface is called
All Superinterfaces:
Apply, Apply.ResultError<T,V,E>
Enclosing interface:
Apply

public static interface Apply.ResultErrorSafe<T,V,E extends Throwable> extends Apply.ResultError<T,V,E>
Very similar to the Apply.ResultError interface but with the difference that it can generate an error at the time of its call.

Unlike Apply.ResultError this can be called without generating any errors, but its use is not recommended unless you know what you are doing.

  • Method Details

    • safeApply

      default Optional<V> safeApply(T item)
      The same behavior of Apply.ResultError.apply(Object) but without launch any error
      Parameters:
      item - target element to which the changes will be applied
      Returns:
      returns the resulting object after applying the configuration or Optional.empty() if action fail