Utils
Keywords: net.corda.core.Utils class
Date: 2023-09-18

net.corda.core

## Class Utils

- net.corda.core.Utils

-     public class Utils

- - ### Constructor Detail

    - #### Utils

          public Utils()

  - ### Method Detail

    - #### toObservable

          @NotNull
          public static <A> rx.Observable<A> toObservable(@NotNull
                                                                   CordaFuture<? extends A> $this$toObservable)

    - #### toFuture

          @NotNull
          public static <T> CordaFuture<T> toFuture(@NotNull
                                                             rx.Observable<T> $this$toFuture)

      Returns a `interface CordaFuture` bound to the first item emitted by this Observable. The future will complete with a NoSuchElementException if no items are emitted or any other error thrown by the Observable. If it's cancelled then it will unsubscribe from the observable.

      See Also:
        `interface CordaFuture`

    - #### mapErrors

          @NotNull
          public static <SNAPSHOT,ELEMENT> DataFeed<SNAPSHOT,ELEMENT> mapErrors(@NotNull
                                                                                         DataFeed<? extends SNAPSHOT,ELEMENT> $this$mapErrors,
                                                                                         @NotNull
                                                                                         kotlin.jvm.functions.Function1<? super java.lang.Throwable,? extends java.lang.Throwable> transform)

      Returns a `class DataFeed` that transforms errors according to the provided `transform` function.

      See Also:
        `class DataFeed`, `transform`

    - #### doOnError

          @NotNull
          public static <SNAPSHOT,ELEMENT> DataFeed<SNAPSHOT,ELEMENT> doOnError(@NotNull
                                                                                         DataFeed<? extends SNAPSHOT,ELEMENT> $this$doOnError,
                                                                                         @NotNull
                                                                                         kotlin.jvm.functions.Function1<? super java.lang.Throwable,kotlin.Unit> action)

      Returns a `class DataFeed` that processes errors according to the provided `action`.

      See Also:
        `class DataFeed`, `action`

    - #### mapErrors

          @NotNull
          public static <ELEMENT> rx.Observable<ELEMENT> mapErrors(@NotNull
                                                                            rx.Observable<ELEMENT> $this$mapErrors,
                                                                            @NotNull
                                                                            kotlin.jvm.functions.Function1<? super java.lang.Throwable,? extends java.lang.Throwable> transform)

      Returns an Observable that transforms errors according to the provided `transform` function.

      See Also:
        `transform`