Package com.infilos.api
Class Failed<T>
- java.lang.Object
-
- com.infilos.api.Failed<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
<U> Result<U>
flatMap(Function<? super T,Result<U>> mapper)
T
get()
Throwable
getFailure()
T
getOrElse(Supplier<T> supplier)
int
hashCode()
void
ifFailed(Consumer<Throwable> consumer)
void
ifSucced(Consumer<T> consumer)
boolean
isFailed()
boolean
isSucced()
<U> Result<U>
map(Function<? super T,? extends U> mapper)
Result<T>
mapFalied(Function<Throwable,? extends Throwable> mapper)
Result<T>
switchIfFailed(Function<Throwable,Result<T>> fallbackMethod)
String
toString()
-
-
-
Method Detail
-
switchIfFailed
public Result<T> switchIfFailed(Function<Throwable,Result<T>> fallbackMethod)
- Specified by:
switchIfFailed
in interfaceResult<T>
-
getFailure
public Throwable getFailure()
- Specified by:
getFailure
in interfaceResult<T>
-
-