Uses of Class
io.atlassian.fugue.Try
Packages that use Try
Package
Description
-
Uses of Try in io.atlassian.fugue
Subclasses of Try in io.atlassian.fugueModifier and TypeClassDescriptionprivate static final classTry.Delayed<A>private static final classTry.Failure<A>private static final classTry.Success<A>Fields in io.atlassian.fugue with type parameters of type TryModifier and TypeFieldDescriptionprivate final AtomicReference<Function<Unit, Try<A>>> Try.Delayed.runReferenceMethods in io.atlassian.fugue that return TryModifier and TypeMethodDescriptionChecked.Supplier.attempt()private <B> Try<B> Try.Delayed.composeDelayed(Function<Try<A>, Try<B>> f) Checked.delay(Checked.Supplier<A, E> s) Create a new delayed Try representing a delayed evaluation of a potentially exception throwing operation.static <A> Try<A> Creates a delayed Try, which will return either a Failure or a Success when evaluated.Try.Delayed.eval()static <A> Try<A> Creates a new failureTry.Delayed.filterOrElse(Predicate<? super A> p, Supplier<Exception> orElseSupplier) Try.Failure.filterOrElse(Predicate<? super A> p, Supplier<Exception> orElseSupplier) Try.filterOrElse(Predicate<? super A> p, Supplier<Exception> orElseSupplier) Return aSuccessif this is aSuccessand the contained values satisfies the given predicate.Try.Success.filterOrElse(Predicate<? super A> p, Supplier<Exception> orElseSupplier) <B> Try<B> <B> Try<B> abstract <B> Try<B> Binds the given function across the success value if it is one.<B> Try<B> static <A> Try<A> Reduces a nested Try by a single level<B> Try<B> <B> Try<B> abstract <B> Try<B> Maps the given function to the value from this `Success` or returns this unchanged if a `Failure`.<B> Try<B> Checked.now(Checked.Supplier<A, E> s) Create a new Try representing the result of a potentially exception throwing operation.Checked.of(Checked.Supplier<A, E> s) Deprecated.If this is a success, return the same success.If this is a success, return the same success.Applies the given function `f` if this is a `Failure` with certain exception type otherwise leaves this unchanged.Applies the given function `f` if this is a `Failure` otherwise this unchanged if a 'Success'.Try.Delayed.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Try.Delayed.recoverWith(Function<? super Exception, Try<A>> f) Try.Failure.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Try.Failure.recoverWith(Function<? super Exception, Try<A>> f) Try.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Binds the given function across certain exception type if it is one, otherwise this unchanged.Try.recoverWith(Function<? super Exception, Try<A>> f) Binds the given function across the failure value if it is one, otherwise this unchanged if a 'Success'.Try.Success.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Try.Success.recoverWith(Function<? super Exception, Try<A>> f) Returns a success wrapping all of the values if all of the arguments were a success, otherwise this returns the first failurestatic <T,A, R> Try <R> Returns a success wrapping all of the values if all of the arguments were a success, otherwise this returns the first failurestatic <A> Try<A> Try.successful(A value) Creates a new SuccessMethods in io.atlassian.fugue that return types with arguments of type TryModifier and TypeMethodDescriptionChecked.delayedLift(Checked.Function<A, B, E> f) Lifts a function that potentially throws into a function that either returns a delayed Try, which, when evaluated, returns a Success of the result or a failure containing the thrown exception.Try.Delayed.getRunner()Checked.Function.lift()Checked.lift(Checked.Function<A, B, E> f) Lifts a function that potentially throws into a function that either returns a Success of the value or a failure containing the thrown exception.FugueCollectors.toTrySuccess()Collect the right values if there are only successes, otherwise return the first failure encountered.FugueCollectors.toTrySuccess()Collect the right values if there are only successes, otherwise return the first failure encountered.FugueCollectors.toTrySuccess(Collector<A, B, C> aCollector) Collect the right values if there are only successes, otherwise return the first failure encountered.FugueCollectors.toTrySuccess(Collector<A, B, C> aCollector) Collect the right values if there are only successes, otherwise return the first failure encountered.Methods in io.atlassian.fugue with parameters of type TryModifier and TypeMethodDescriptionstatic <A> Try<A> Reduces a nested Try by a single levelIf this is a success, return the same success.Method parameters in io.atlassian.fugue with type arguments of type TryModifier and TypeMethodDescriptionprivate <B> Try<B> Try.Delayed.composeDelayed(Function<Try<A>, Try<B>> f) private <B> Try<B> Try.Delayed.composeDelayed(Function<Try<A>, Try<B>> f) static <A> Try<A> Creates a delayed Try, which will return either a Failure or a Success when evaluated.<B> Try<B> <B> Try<B> abstract <B> Try<B> Binds the given function across the success value if it is one.<B> Try<B> static <A> Try<A> Reduces a nested Try by a single level(package private) static <A> Try.Delayed<A> Try.Delayed.fromSupplier(Supplier<Try<A>> delayed) If this is a success, return the same success.Try.Delayed.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Try.Delayed.recoverWith(Function<? super Exception, Try<A>> f) Try.Failure.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Try.Failure.recoverWith(Function<? super Exception, Try<A>> f) Try.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Binds the given function across certain exception type if it is one, otherwise this unchanged.Try.recoverWith(Function<? super Exception, Try<A>> f) Binds the given function across the failure value if it is one, otherwise this unchanged if a 'Success'.Try.Success.recoverWith(Class<X> exceptionType, Function<? super X, Try<A>> f) Try.Success.recoverWith(Function<? super Exception, Try<A>> f) Returns a success wrapping all of the values if all of the arguments were a success, otherwise this returns the first failurestatic <T,A, R> Try <R> Returns a success wrapping all of the values if all of the arguments were a success, otherwise this returns the first failureConstructor parameters in io.atlassian.fugue with type arguments of type Try -
Uses of Try in io.atlassian.fugue.extensions.step
Fields in io.atlassian.fugue.extensions.step declared as TryModifier and TypeFieldDescriptionTryStep1.try1TryStep2.try1TryStep3.try1TryStep4.try1TryStep5.try1TryStep6.try1TryStep2.try2TryStep3.try2TryStep4.try2TryStep5.try2TryStep6.try2TryStep3.try3TryStep4.try3TryStep5.try3TryStep6.try3TryStep4.try4TryStep5.try4TryStep6.try4TryStep5.try5TryStep6.try5TryStep6.try6Methods in io.atlassian.fugue.extensions.step that return TryModifier and TypeMethodDescription<Z> Try<Z> Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z> TryStep2.yield(BiFunction<? super A, ? super B, Z> functor) Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z> Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z> Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z> Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z> TryStep6.yield(Function6<? super A, ? super B, ? super C, ? super D, ? super E, ? super F, Z> functor) Terminating step expression, that will provide the previous steps to this function and return the result as aSuccessMethods in io.atlassian.fugue.extensions.step with parameters of type TryModifier and TypeMethodDescriptionstatic <A> TryStep1<A> Begin a new Steps expresison, using theTrytype.Method parameters in io.atlassian.fugue.extensions.step with type arguments of type TryModifier and TypeMethodDescriptionApply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.TryStep2.then(BiFunction<? super A, ? super B, Try<C>> functor) Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.Apply the provided function with the previous Step results.Apply the provided supplier with the previous Step results.Constructors in io.atlassian.fugue.extensions.step with parameters of type TryModifierConstructorDescription(package private)(package private)(package private)(package private)(package private)(package private) -
Uses of Try in io.atlassian.fugue.hamcrest
Subclasses with type arguments of type Try in io.atlassian.fugue.hamcrestModifier and TypeClassDescriptionprivate static classprivate static classMethods in io.atlassian.fugue.hamcrest that return types with arguments of type TryModifier and TypeMethodDescriptionstatic org.hamcrest.Matcher<Try<?>> TryMatchers.isFailure()static org.hamcrest.Matcher<Try<?>> static <A> org.hamcrest.Matcher<Try<A>> TryMatchers.isSuccessful(org.hamcrest.Matcher<? super A> subMatcher) Methods in io.atlassian.fugue.hamcrest with parameters of type TryModifier and TypeMethodDescriptionprotected voidTryMatchers.FailureMatcher.describeMismatchSafely(Try<?> actual, org.hamcrest.Description mismatchDescription) protected voidTryMatchers.SuccessfulMatcher.describeMismatchSafely(Try<A> actual, org.hamcrest.Description mismatchDescription) protected booleanTryMatchers.FailureMatcher.matchesSafely(Try<?> actual) protected booleanTryMatchers.SuccessfulMatcher.matchesSafely(Try<A> actual)
Checked.now(Supplier)to make it clear that the supplier is evaluated immediately.