aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/pacien/lemonad/attempt/Attempt.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/pacien/lemonad/attempt/Attempt.java b/src/main/java/org/pacien/lemonad/attempt/Attempt.java
index fc437ad..e36ac4b 100644
--- a/src/main/java/org/pacien/lemonad/attempt/Attempt.java
+++ b/src/main/java/org/pacien/lemonad/attempt/Attempt.java
@@ -84,7 +84,7 @@ public interface Attempt<R, E> {
84 * @param mapper a function producing an {@link Attempt}, called with the current error if this {@link Attempt} is a failure. 84 * @param mapper a function producing an {@link Attempt}, called with the current error if this {@link Attempt} is a failure.
85 * @return this {@link Attempt} if it is a success, or the alternative {@link Attempt} retrieved from the supplier otherwise. 85 * @return this {@link Attempt} if it is a success, or the alternative {@link Attempt} retrieved from the supplier otherwise.
86 */ 86 */
87 default <EE> Attempt<R, EE> mapFailure(@NonNull Function<? super E, ? extends Attempt<? extends R, ? extends EE>> mapper) { 87 default <EE> Attempt<R, EE> mapError(@NonNull Function<? super E, ? extends Attempt<? extends R, ? extends EE>> mapper) {
88 //noinspection unchecked 88 //noinspection unchecked
89 return (Attempt<R, EE>) (isFailure() ? mapper.apply(getError()) : this); 89 return (Attempt<R, EE>) (isFailure() ? mapper.apply(getError()) : this);
90 } 90 }