public class ErrorOr<A>
Representation of an operation that may have thrown an error.
Modifier and Type | Class and Description |
---|---|
static class |
ErrorOr.Companion |
Modifier and Type | Field and Description |
---|---|
static ErrorOr.Companion |
Companion |
Constructor and Description |
---|
ErrorOr(A value) |
Modifier and Type | Method and Description |
---|---|
<B> ErrorOr<B> |
bind(kotlin.jvm.functions.Function1<? super A,? extends net.corda.core.ErrorOr<? extends B>> function) |
<B,C> ErrorOr<C> |
combine(ErrorOr<? extends B> other,
kotlin.jvm.functions.Function2<? super A,? super B,? extends C> function) |
A |
component1() |
java.lang.Throwable |
component2() |
ErrorOr<A> |
copy(A value,
java.lang.Throwable error)
Representation of an operation that may have thrown an error.
|
boolean |
equals(java.lang.Object p) |
java.lang.Throwable |
getError() |
A |
getOrThrow() |
A |
getValue() |
int |
hashCode() |
<B> ErrorOr<B> |
map(kotlin.jvm.functions.Function1<? super A,? extends B> function) |
<T> T |
match(kotlin.jvm.functions.Function1<? super A,? extends T> onValue,
kotlin.jvm.functions.Function1<? super java.lang.Throwable,? extends T> onError) |
java.lang.String |
toString() |
public static ErrorOr.Companion Companion
public <T> T match(kotlin.jvm.functions.Function1<? super A,? extends T> onValue, kotlin.jvm.functions.Function1<? super java.lang.Throwable,? extends T> onError)
public A getOrThrow()
public <B> ErrorOr<B> map(kotlin.jvm.functions.Function1<? super A,? extends B> function)
public <B,C> ErrorOr<C> combine(ErrorOr<? extends B> other, kotlin.jvm.functions.Function2<? super A,? super B,? extends C> function)
public <B> ErrorOr<B> bind(kotlin.jvm.functions.Function1<? super A,? extends net.corda.core.ErrorOr<? extends B>> function)
public A getValue()
public java.lang.Throwable getError()
public A component1()
public java.lang.Throwable component2()
public ErrorOr<A> copy(A value, java.lang.Throwable error)
Representation of an operation that may have thrown an error.
public java.lang.String toString()
public int hashCode()
public boolean equals(java.lang.Object p)