Uses of Class
com.jnape.palatable.lambda.adt.Try
Packages that use Try
-
Uses of Try in com.jnape.palatable.lambda.adt
Subclasses of Try in com.jnape.palatable.lambda.adtModifier and TypeClassDescriptionprivate static final classTry.Failure<A>private static final classTry.Success<A>Classes in com.jnape.palatable.lambda.adt that implement interfaces with type arguments of type TryModifier and TypeClassDescriptionclassTry<A>AMonadof the evaluation outcome of an expression that might throw.classTry<A>AMonadof the evaluation outcome of an expression that might throw.classTry<A>AMonadof the evaluation outcome of an expression that might throw.classTry<A>AMonadof the evaluation outcome of an expression that might throw.Methods in com.jnape.palatable.lambda.adt with type parameters of type TryModifier and TypeMethodDescription<B, App extends Applicative<?,App>, TravB extends Traversable<B, Try<?>>, AppTrav extends Applicative<TravB, App>>
AppTravTry.traverse(Fn1<? super A, ? extends Applicative<B, App>> fn, Fn1<? super TravB, ? extends AppTrav> pure) Applyfnto each element of this traversable from left to right, and collapse the results into a single resulting applicative, potentially with the assistance of the applicative's pure function.Methods in com.jnape.palatable.lambda.adt that return TryModifier and TypeMethodDescriptionTry.catching(Fn1<? super Throwable, ? extends Boolean> predicate, Fn1<? super Throwable, ? extends A> recoveryFn) Catch any thrownTsatisfyingpredicateand map it to a success value.Catch any instance ofthrowableTypeand map it to a success value.<B> Try<B> Try.discardL(Applicative<B, Try<?>> appB) Sequence both thisApplicativeandappB, discarding thisApplicative'sresult and returningappB.Try.discardR(Applicative<B, Try<?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.Try.ensuring(SideEffect sideEffect) Run the provided runnable regardless of whether this is a success or a failure (theTryanalog tofinally.static <A> Try<A> Static factory method for creating a failure value.<B> Try<B> Chain dependent computations that may continue or short-circuit based on previous results.<B> Try<B> Covariantly transmute this functor's parameter using the given mapping function.<B> Try<B> Try.pure(B b) Lift the valuebinto this applicative functor.static <A> Try<A> Try.success(A a) Static factory method for creating a success value.Try.throwError(Throwable throwable) Throw an error value of typeEinto themonad.<B> Try<B> Try.trampolineM(Fn1<? super A, ? extends MonadRec<RecursiveResult<A, B>, Try<?>>> fn) Given some operation yielding aRecursiveResultinside thisMonadRec, internally trampoline the operation until it yields aterminationinstruction.static <A> Try<A> Try.trying(SideEffect sideEffect) static <A extends AutoCloseable, B extends AutoCloseable, C extends AutoCloseable, D>
Try<D> Try.withResources(Fn0<? extends A> fn0, Fn1<? super A, ? extends B> bFn, Fn1<? super B, ? extends C> cFn, Fn1<? super C, ? extends Try<? extends D>> fn) Convenience overload ofwithResourcesthat cascades two dependent resource creations via nested calls.static <A extends AutoCloseable, B extends AutoCloseable, C>
Try<C> Try.withResources(Fn0<? extends A> fn0, Fn1<? super A, ? extends B> bFn, Fn1<? super B, ? extends Try<? extends C>> fn) Convenience overload ofwithResourcesthat cascades dependent resource creation via nested calls.static <A extends AutoCloseable, B>
Try<B> Try.withResources(Fn0<? extends A> fn0, Fn1<? super A, ? extends Try<? extends B>> fn) Given aFn0<AutoCloseable>aSupplierand anFn1fn, applyfnto the result ofaSupplier, ensuring that the result has itsclosemethod invoked, regardless of the outcome.<B> Try<B> Try.zip(Applicative<Fn1<? super A, ? extends B>, Try<?>> appFn) Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Methods in com.jnape.palatable.lambda.adt that return types with arguments of type TryModifier and TypeMethodDescriptionGiven alazyinstance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Try.pureTry()Method parameters in com.jnape.palatable.lambda.adt with type arguments of type TryModifier and TypeMethodDescription<B> Try<B> Try.discardL(Applicative<B, Try<?>> appB) Sequence both thisApplicativeandappB, discarding thisApplicative'sresult and returningappB.Try.discardR(Applicative<B, Try<?>> appB) Sequence both thisApplicativeandappB, discardingappB'sresult and returning thisApplicative.<B> Try<B> Chain dependent computations that may continue or short-circuit based on previous results.Given alazyinstance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.<B> Try<B> Try.trampolineM(Fn1<? super A, ? extends MonadRec<RecursiveResult<A, B>, Try<?>>> fn) Given some operation yielding aRecursiveResultinside thisMonadRec, internally trampoline the operation until it yields aterminationinstruction.static <A extends AutoCloseable, B>
Try<B> Try.withResources(Fn0<? extends A> fn0, Fn1<? super A, ? extends Try<? extends B>> fn) Given aFn0<AutoCloseable>aSupplierand anFn1fn, applyfnto the result ofaSupplier, ensuring that the result has itsclosemethod invoked, regardless of the outcome.<B> Try<B> Try.zip(Applicative<Fn1<? super A, ? extends B>, Try<?>> appFn) Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.