Uses of Interface
io.vavr.control.Try

Packages that use Try
Package
Description
Beside API the io.vavr package contains core types like (Checked)Functions and Tuples.
This package contains basic building blocks for creating fast, asynchronous, non-blocking parallel code.
Control structures like the disjoint union type Either, the optional value type Option and Try for exception handling.
  • Uses of Try in io.vavr

    Fields in io.vavr declared as Try
    Modifier and Type
    Field
    Description
    private final Try<T1>
    API.For1Try.ts1
     
    private final Try<T1>
    API.For2Try.ts1
     
    private final Try<T1>
    API.For3Try.ts1
     
    private final Try<T1>
    API.For4Try.ts1
     
    private final Try<T1>
    API.For5Try.ts1
     
    private final Try<T1>
    API.For6Try.ts1
     
    private final Try<T1>
    API.For7Try.ts1
     
    private final Try<T1>
    API.For8Try.ts1
     
    private final Try<T2>
    API.For2Try.ts2
     
    private final Try<T2>
    API.For3Try.ts2
     
    private final Try<T2>
    API.For4Try.ts2
     
    private final Try<T2>
    API.For5Try.ts2
     
    private final Try<T2>
    API.For6Try.ts2
     
    private final Try<T2>
    API.For7Try.ts2
     
    private final Try<T2>
    API.For8Try.ts2
     
    private final Try<T3>
    API.For3Try.ts3
     
    private final Try<T3>
    API.For4Try.ts3
     
    private final Try<T3>
    API.For5Try.ts3
     
    private final Try<T3>
    API.For6Try.ts3
     
    private final Try<T3>
    API.For7Try.ts3
     
    private final Try<T3>
    API.For8Try.ts3
     
    private final Try<T4>
    API.For4Try.ts4
     
    private final Try<T4>
    API.For5Try.ts4
     
    private final Try<T4>
    API.For6Try.ts4
     
    private final Try<T4>
    API.For7Try.ts4
     
    private final Try<T4>
    API.For8Try.ts4
     
    private final Try<T5>
    API.For5Try.ts5
     
    private final Try<T5>
    API.For6Try.ts5
     
    private final Try<T5>
    API.For7Try.ts5
     
    private final Try<T5>
    API.For8Try.ts5
     
    private final Try<T6>
    API.For6Try.ts6
     
    private final Try<T6>
    API.For7Try.ts6
     
    private final Try<T6>
    API.For8Try.ts6
     
    private final Try<T7>
    API.For7Try.ts7
     
    private final Try<T7>
    API.For8Try.ts7
     
    private final Try<T8>
    API.For8Try.ts8
     
    Methods in io.vavr with type parameters of type Try
    Modifier and Type
    Method
    Description
    static <T, _1 extends Option<Try<T>>>
    API.Match.Pattern1<Future<T>,_1>
    Patterns.$Future(API.Match.Pattern<_1,?> p1)
     
    Methods in io.vavr that return Try
    Modifier and Type
    Method
    Description
    default Try<T>
    Value.toTry()
    Converts this to a Try.
    default Try<T>
    Value.toTry(Supplier<? extends Throwable> ifEmpty)
    Converts this to a Try.
    static <T> Try<T>
    API.Try(CheckedFunction0<? extends T> supplier)
    API.For1Try.yield()
    A shortcut for yield(Function.identity()).
    <R> Try<R>
    API.For1Try.yield(Function<? super T1,? extends R> f)
    Yields a result for elements of the cross product of the underlying Try.
    <R> Try<R>
    API.For2Try.yield(BiFunction<? super T1,? super T2,? extends R> f)
    Yields a result for elements of the cross product of the underlying Trys.
    <R> Try<R>
    API.For3Try.yield(Function3<? super T1,? super T2,? super T3,? extends R> f)
    Yields a result for elements of the cross product of the underlying Trys.
    <R> Try<R>
    API.For4Try.yield(Function4<? super T1,? super T2,? super T3,? super T4,? extends R> f)
    Yields a result for elements of the cross product of the underlying Trys.
    <R> Try<R>
    API.For5Try.yield(Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
    Yields a result for elements of the cross product of the underlying Trys.
    <R> Try<R>
    API.For6Try.yield(Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
    Yields a result for elements of the cross product of the underlying Trys.
    <R> Try<R>
    API.For7Try.yield(Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
    Yields a result for elements of the cross product of the underlying Trys.
    <R> Try<R>
    API.For8Try.yield(Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
    Yields a result for elements of the cross product of the underlying Trys.
    Methods in io.vavr that return types with arguments of type Try
    Modifier and Type
    Method
    Description
    (package private) static <T> Tuple1<Option<Try<T>>>
    $.Future(Future<T> future)
     
    static <R> Function0<Try<R>>
    CheckedFunction0.liftTry(CheckedFunction0<? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, R> Function1<T1,Try<R>>
    CheckedFunction1.liftTry(CheckedFunction1<? super T1,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, R>
    Function2<T1,T2,Try<R>>
    CheckedFunction2.liftTry(CheckedFunction2<? super T1,? super T2,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, R>
    Function3<T1,T2,T3,Try<R>>
    CheckedFunction3.liftTry(CheckedFunction3<? super T1,? super T2,? super T3,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, R>
    Function4<T1,T2,T3,T4,Try<R>>
    CheckedFunction4.liftTry(CheckedFunction4<? super T1,? super T2,? super T3,? super T4,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, R>
    Function5<T1,T2,T3,T4,T5,Try<R>>
    CheckedFunction5.liftTry(CheckedFunction5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, T6, R>
    Function6<T1,T2,T3,T4,T5,T6,Try<R>>
    CheckedFunction6.liftTry(CheckedFunction6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, T6, T7, R>
    Function7<T1,T2,T3,T4,T5,T6,T7,Try<R>>
    CheckedFunction7.liftTry(CheckedFunction7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, T6, T7, T8, R>
    Function8<T1,T2,T3,T4,T5,T6,T7,T8,Try<R>>
    CheckedFunction8.liftTry(CheckedFunction8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <R> Function0<Try<R>>
    Function0.liftTry(Supplier<? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, R> Function1<T1,Try<R>>
    Function1.liftTry(Function<? super T1,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, R>
    Function2<T1,T2,Try<R>>
    Function2.liftTry(BiFunction<? super T1,? super T2,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, R>
    Function3<T1,T2,T3,Try<R>>
    Function3.liftTry(Function3<? super T1,? super T2,? super T3,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, R>
    Function4<T1,T2,T3,T4,Try<R>>
    Function4.liftTry(Function4<? super T1,? super T2,? super T3,? super T4,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, R>
    Function5<T1,T2,T3,T4,T5,Try<R>>
    Function5.liftTry(Function5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, T6, R>
    Function6<T1,T2,T3,T4,T5,T6,Try<R>>
    Function6.liftTry(Function6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, T6, T7, R>
    Function7<T1,T2,T3,T4,T5,T6,T7,Try<R>>
    Function7.liftTry(Function7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    static <T1, T2, T3, T4, T5, T6, T7, T8, R>
    Function8<T1,T2,T3,T4,T5,T6,T7,T8,Try<R>>
    Function8.liftTry(Function8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> partialFunction)
    Lifts the given partialFunction into a total function that returns an Try result.
    Methods in io.vavr with parameters of type Try
    Modifier and Type
    Method
    Description
    static <T1> API.For1Try<T1>
    API.For(Try<T1> ts1)
    Creates a For-comprehension of one Try.
    static <T1, T2> API.For2Try<T1,T2>
    API.For(Try<T1> ts1, Try<T2> ts2)
    Creates a For-comprehension of two Trys.
    static <T1, T2, T3>
    API.For3Try<T1,T2,T3>
    API.For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3)
    Creates a For-comprehension of three Trys.
    static <T1, T2, T3, T4>
    API.For4Try<T1,T2,T3,T4>
    API.For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4)
    Creates a For-comprehension of 4 Trys.
    static <T1, T2, T3, T4, T5>
    API.For5Try<T1,T2,T3,T4,T5>
    API.For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5)
    Creates a For-comprehension of 5 Trys.
    static <T1, T2, T3, T4, T5, T6>
    API.For6Try<T1,T2,T3,T4,T5,T6>
    API.For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6)
    Creates a For-comprehension of 6 Trys.
    static <T1, T2, T3, T4, T5, T6, T7>
    API.For7Try<T1,T2,T3,T4,T5,T6,T7>
    API.For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7)
    Creates a For-comprehension of 7 Trys.
    static <T1, T2, T3, T4, T5, T6, T7, T8>
    API.For8Try<T1,T2,T3,T4,T5,T6,T7,T8>
    API.For(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7, Try<T8> ts8)
    Creates a For-comprehension of 8 Trys.
    Constructors in io.vavr with parameters of type Try
    Modifier
    Constructor
    Description
    private
    For1Try(Try<T1> ts1)
     
    private
    For2Try(Try<T1> ts1, Try<T2> ts2)
     
    private
    For3Try(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3)
     
    private
    For4Try(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4)
     
    private
    For5Try(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5)
     
    private
    For6Try(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6)
     
    private
    For7Try(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7)
     
    private
    For8Try(Try<T1> ts1, Try<T2> ts2, Try<T3> ts3, Try<T4> ts4, Try<T5> ts5, Try<T6> ts6, Try<T7> ts7, Try<T8> ts8)
     
  • Uses of Try in io.vavr.concurrent

    Fields in io.vavr.concurrent with type parameters of type Try
    Modifier and Type
    Field
    Description
    private Queue<Consumer<Try<T>>>
    FutureImpl.actions
    The queue of actions is filled when calling onComplete() before the Future is completed or cancelled.
    private Option<Try<T>>
    FutureImpl.value
    Once the Future is completed, the value is defined.
    Methods in io.vavr.concurrent that return types with arguments of type Try
    Modifier and Type
    Method
    Description
    Future.getValue()
    Returns the value of the Future.
    FutureImpl.getValue()
     
    Methods in io.vavr.concurrent with parameters of type Try
    Modifier and Type
    Method
    Description
    default Promise<T>
    Promise.complete(Try<? extends T> value)
    Completes this Promise with the given value.
    static <T> Future<T>
    Future.fromTry(Try<? extends T> result)
    Creates a Future from a Try, backed by the Future.DEFAULT_EXECUTOR.
    static <T> Future<T>
    Future.fromTry(Executor executor, Try<? extends T> result)
    Creates a Future from a Try, backed by the given Executor.
    static <T> Promise<T>
    Promise.fromTry(Try<? extends T> result)
    Creates a Promise from a Try, backed by the Future.DEFAULT_EXECUTOR.
    static <T> Promise<T>
    Promise.fromTry(Executor executor, Try<? extends T> result)
    Creates a Promise from a Try, backed by the given Executor.
    (package private) static <T> FutureImpl<T>
    FutureImpl.of(Executor executor, Try<? extends T> value)
    Creates a FutureImpl that is immediately completed with the given value.
    (package private) boolean
    FutureImpl.tryComplete(Try<? extends T> value)
    INTERNAL METHOD, SHOULD BE USED BY THE CONSTRUCTOR, ONLY.
    boolean
    Promise.tryComplete(Try<? extends T> value)
    Attempts to completes this Promise with the given value.
    boolean
    PromiseImpl.tryComplete(Try<? extends T> value)
     
    boolean
    Task.Complete.with(Try<? extends T> value)
    A function that takes a Try (success or failure) and returns the state of completion.
    Method parameters in io.vavr.concurrent with type arguments of type Try
    Modifier and Type
    Method
    Description
    default Future<T>
    Future.andThen(Consumer<? super Try<T>> action)
    Support for chaining of callbacks that are guaranteed to be executed in a specific order.
    Future.onComplete(Consumer<? super Try<T>> action)
    Performs the action once the Future is complete.
    FutureImpl.onComplete(Consumer<? super Try<T>> action)
     
    private void
    FutureImpl.perform(Consumer<? super Try<T>> action)
     
    default <U> Future<U>
    Future.transformValue(Function<? super Try<T>,? extends Try<? extends U>> f)
    Transforms the value of this Future, whether it is a success or a failure.
    default <U> Future<U>
    Future.transformValue(Function<? super Try<T>,? extends Try<? extends U>> f)
    Transforms the value of this Future, whether it is a success or a failure.
    Constructor parameters in io.vavr.concurrent with type arguments of type Try
    Modifier
    Constructor
    Description
    private
    FutureImpl(Executor executor, Option<Try<T>> value, Queue<Consumer<Try<T>>> actions, Queue<Thread> waiters, FutureImpl.Computation<T> computation)
     
    private
    FutureImpl(Executor executor, Option<Try<T>> value, Queue<Consumer<Try<T>>> actions, Queue<Thread> waiters, FutureImpl.Computation<T> computation)
     
  • Uses of Try in io.vavr.control

    Classes in io.vavr.control that implement Try
    Modifier and Type
    Class
    Description
    static final class 
    A failed Try.
    static final class 
    A succeeded Try.
    Methods in io.vavr.control that return Try
    Modifier and Type
    Method
    Description
    default Try<T>
    Try.andFinally(Runnable runnable)
    Provides try's finally behavior no matter what the result of the operation is.
    default Try<T>
    Provides try's finally behavior no matter what the result of the operation is.
    default Try<T>
    Try.andThen(Runnable runnable)
    Shortcut for andThenTry(runnable::run), see andThenTry(CheckedRunnable).
    default Try<T>
    Try.andThen(Consumer<? super T> consumer)
    Shortcut for andThenTry(consumer::accept), see andThenTry(CheckedConsumer).
    default Try<T>
    Try.andThenTry(CheckedConsumer<? super T> consumer)
    Passes the result to the given consumer if this is a Success.
    default Try<T>
    Runs the given runnable if this is a Success, otherwise returns this Failure.
    default <R> Try<R>
    Try.collect(PartialFunction<? super T,? extends R> partialFunction)
    Collects value that is in the domain of the given partialFunction by mapping the value to type R.
    default Try<Throwable>
    Try.failed()
    Returns Success(throwable) if this is a Failure(throwable), otherwise a Failure(new NoSuchElementException("Success.failed()")) if this is a Success.
    static <T> Try<T>
    Try.failure(Throwable exception)
    Creates a Try.Failure that contains the given exception.
    default Try<T>
    Try.filter(Predicate<? super T> predicate)
    Shortcut for filterTry(predicate::test), see filterTry(CheckedPredicate)}.
    default Try<T>
    Try.filter(Predicate<? super T> predicate, Function<? super T,? extends Throwable> errorProvider)
    Shortcut for filterTry(predicate::test, errorProvider::apply), see filterTry(CheckedPredicate, CheckedFunction1)}.
    default Try<T>
    Try.filter(Predicate<? super T> predicate, Supplier<? extends Throwable> throwableSupplier)
    Shortcut for filterTry(predicate::test, throwableSupplier), see filterTry(CheckedPredicate, Supplier)}.
    default Try<T>
    Try.filterTry(CheckedPredicate<? super T> predicate)
    Returns this if this is a Failure or this is a Success and the value satisfies the predicate.
    default Try<T>
    Try.filterTry(CheckedPredicate<? super T> predicate, CheckedFunction1<? super T,? extends Throwable> errorProvider)
    Returns this if this is a Failure or this is a Success and the value satisfies the predicate.
    default Try<T>
    Try.filterTry(CheckedPredicate<? super T> predicate, Supplier<? extends Throwable> throwableSupplier)
    Returns this if this is a Failure or this is a Success and the value satisfies the predicate.
    default <U> Try<U>
    Try.flatMap(Function<? super T,? extends Try<? extends U>> mapper)
    Shortcut for flatMapTry(mapper::apply), see flatMapTry(CheckedFunction1).
    default <U> Try<U>
    Try.flatMapTry(CheckedFunction1<? super T,? extends Try<? extends U>> mapper)
    FlatMaps the value of a Success or returns a Failure.
    default <U> Try<U>
    Try.map(Function<? super T,? extends U> mapper)
    Shortcut for mapTry(mapper::apply), see mapTry(CheckedFunction1).
    default Try<T>
    Try.mapFailure(API.Match.Case<? extends Throwable,? extends Throwable>... cases)
    Maps the cause to a new exception if this is a Failure or returns this instance if this is a Success.
    default <U> Try<U>
    Try.mapTry(CheckedFunction1<? super T,? extends U> mapper)
    Runs the given checked function if this is a Try.Success, passing the result of the current expression to it.
    static <T> Try<T>
    Try.narrow(Try<? extends T> t)
    Narrows a widened Try<? extends T> to Try<T> by performing a type-safe cast.
    static <T> Try<T>
    Try.of(CheckedFunction0<? extends T> supplier)
    Creates a Try of a CheckedFunction0.
    <R> Try<R>
    Try.WithResources1.of(CheckedFunction1<? super T1,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    <R> Try<R>
    Try.WithResources2.of(CheckedFunction2<? super T1,? super T2,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    <R> Try<R>
    Try.WithResources3.of(CheckedFunction3<? super T1,? super T2,? super T3,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    <R> Try<R>
    Try.WithResources4.of(CheckedFunction4<? super T1,? super T2,? super T3,? super T4,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    <R> Try<R>
    Try.WithResources5.of(CheckedFunction5<? super T1,? super T2,? super T3,? super T4,? super T5,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    <R> Try<R>
    Try.WithResources6.of(CheckedFunction6<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    <R> Try<R>
    Try.WithResources7.of(CheckedFunction7<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    <R> Try<R>
    Try.WithResources8.of(CheckedFunction8<? super T1,? super T2,? super T3,? super T4,? super T5,? super T6,? super T7,? super T8,? extends R> f)
    Wraps the result of a computation that may fail in a Try.
    static <T> Try<T>
    Try.ofCallable(Callable<? extends T> callable)
    Creates a Try of a Callable.
    static <T> Try<T>
    Try.ofSupplier(Supplier<? extends T> supplier)
    Creates a Try of a Supplier.
    default <X extends Throwable>
    Try<T>
    Try.onFailure(Class<X> exceptionType, Consumer<? super X> action)
    Consumes the cause if this is a Try.Failure and the cause is instance of X.
    default Try<T>
    Try.onFailure(Consumer<? super Throwable> action)
    Consumes the cause if this is a Try.Failure.
    default Try<T>
    Try.onSuccess(Consumer<? super T> action)
    Consumes the value if this is a Try.Success.
    default Try<T>
    Try.orElse(Try<? extends T> other)
     
    default Try<T>
    Try.orElse(Supplier<? extends Try<? extends T>> supplier)
     
    default Try<T>
    Try.peek(Consumer<? super T> action)
    Applies the action to the value of a Success or does nothing in the case of a Failure.
    default <X extends Throwable>
    Try<T>
    Try.recover(Class<X> exceptionType, Function<? super X,? extends T> f)
    Returns this, if this is a Success or this is a Failure and the cause is not assignable from cause.getClass().
    default <X extends Throwable>
    Try<T>
    Try.recover(Class<X> exceptionType, T value)
    Returns this, if this is a Try.Success or this is a Failure and the cause is not assignable from cause.getClass().
    default Try<T>
    Try.recover(Function<? super Throwable,? extends T> f)
    Returns this, if this is a Success, otherwise tries to recover the exception of the failure with f, i.e.
    default <X extends Throwable>
    Try<T>
    Try.recoverWith(Class<X> exceptionType, Try<? extends T> recovered)
    Recovers this Try with the given recovered, if this is a Try.Failure and the given exceptionType is assignable to the underlying cause type.
    default <X extends Throwable>
    Try<T>
    Try.recoverWith(Class<X> exceptionType, Function<? super X,Try<? extends T>> f)
    Returns this, if this is a Success or this is a Failure and the cause is not assignable from cause.getClass().
    default Try<T>
    Try.recoverWith(Function<? super Throwable,? extends Try<? extends T>> f)
    Returns this, if this is a Success, otherwise tries to recover the exception of the failure with f, i.e.
    static Try<Void>
    Try.run(CheckedRunnable runnable)
    Creates a Try of a CheckedRunnable.
    static Try<Void>
    Try.runRunnable(Runnable runnable)
    Creates a Try of a Runnable.
    static <T> Try<Seq<T>>
    Try.sequence(Iterable<? extends Try<? extends T>> values)
    Reduces many Trys into a single Try by transforming an Iterable<Try<? extends T>> into a Try<Seq<T>>.
    static <T> Try<T>
    Try.success(T value)
    Creates a Try.Success that contains the given value.
    static <T, U> Try<Seq<U>>
    Try.traverse(Iterable<? extends T> values, Function<? super T,? extends Try<? extends U>> mapper)
    Maps the values of an iterable to a sequence of mapped values into a single Try by transforming an Iterable<? extends T> into a Try<Seq<U>>.
    Methods in io.vavr.control with parameters of type Try
    Modifier and Type
    Method
    Description
    static <T> Validation<Throwable,T>
    Validation.fromTry(Try<? extends T> t)
    Creates a Validation of an Try.
    static <T> Try<T>
    Try.narrow(Try<? extends T> t)
    Narrows a widened Try<? extends T> to Try<T> by performing a type-safe cast.
    default Try<T>
    Try.orElse(Try<? extends T> other)
     
    default <X extends Throwable>
    Try<T>
    Try.recoverWith(Class<X> exceptionType, Try<? extends T> recovered)
    Recovers this Try with the given recovered, if this is a Try.Failure and the given exceptionType is assignable to the underlying cause type.
    Method parameters in io.vavr.control with type arguments of type Try
    Modifier and Type
    Method
    Description
    default <U> Try<U>
    Try.flatMap(Function<? super T,? extends Try<? extends U>> mapper)
    Shortcut for flatMapTry(mapper::apply), see flatMapTry(CheckedFunction1).
    default <U> Try<U>
    Try.flatMapTry(CheckedFunction1<? super T,? extends Try<? extends U>> mapper)
    FlatMaps the value of a Success or returns a Failure.
    default Try<T>
    Try.orElse(Supplier<? extends Try<? extends T>> supplier)
     
    default <X extends Throwable>
    Try<T>
    Try.recoverWith(Class<X> exceptionType, Function<? super X,Try<? extends T>> f)
    Returns this, if this is a Success or this is a Failure and the cause is not assignable from cause.getClass().
    default Try<T>
    Try.recoverWith(Function<? super Throwable,? extends Try<? extends T>> f)
    Returns this, if this is a Success, otherwise tries to recover the exception of the failure with f, i.e.
    static <T> Try<Seq<T>>
    Try.sequence(Iterable<? extends Try<? extends T>> values)
    Reduces many Trys into a single Try by transforming an Iterable<Try<? extends T>> into a Try<Seq<T>>.
    default <U> U
    Try.transform(Function<? super Try<T>,? extends U> f)
    Transforms this Try.
    static <T, U> Try<Seq<U>>
    Try.traverse(Iterable<? extends T> values, Function<? super T,? extends Try<? extends U>> mapper)
    Maps the values of an iterable to a sequence of mapped values into a single Try by transforming an Iterable<? extends T> into a Try<Seq<U>>.