net.corda.core

## Class ErrorOr<A>

- net.corda.core.ErrorOr<A>

-     public class ErrorOr<A>

  Representation of an operation that may have thrown an error.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ErrorOr.Companion`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ErrorOr.Companion` | `Companion`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ErrorOr(A value)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    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()`

- - ### Field Detail

    - #### Companion

          public static ErrorOr.Companion Companion

  - ### Constructor Detail

    - #### ErrorOr

          public ErrorOr(A value)

  - ### Method Detail

    - #### match

          public <T> T match(kotlin.jvm.functions.Function1<? super A,? extends T> onValue,
                             kotlin.jvm.functions.Function1<? super java.lang.Throwable,? extends T> onError)

    - #### getOrThrow

          public A getOrThrow()

    - #### map

          public <B> ErrorOr<B> map(kotlin.jvm.functions.Function1<? super A,? extends B> function)

    - #### combine

          public <B,C> ErrorOr<C> combine(ErrorOr<? extends B> other,
                                          kotlin.jvm.functions.Function2<? super A,? super B,? extends C> function)

    - #### bind

          public <B> ErrorOr<B> bind(kotlin.jvm.functions.Function1<? super A,? extends net.corda.core.ErrorOr<? extends B>> function)

    - #### getValue

          public A getValue()

    - #### getError

          public java.lang.Throwable getError()

    - #### component1

          public A component1()

    - #### component2

          public java.lang.Throwable component2()

    - #### copy

          public ErrorOr<A> copy(A value,
                                 java.lang.Throwable error)

      Representation of an operation that may have thrown an error.

    - #### toString

          public java.lang.String toString()

    - #### hashCode

          public int hashCode()

    - #### equals

          public boolean equals(java.lang.Object p)