Uses of Class
io.atlassian.fugue.Try
-
Packages that use Try Package Description io.atlassian.fugue io.atlassian.fugue.extensions.step io.atlassian.fugue.hamcrest -
-
Uses of Try in io.atlassian.fugue
Subclasses of Try in io.atlassian.fugue Modifier and Type Class Description private static classTry.Delayed<A>private static classTry.Failure<A>private static classTry.Success<A>Fields in io.atlassian.fugue with type parameters of type Try Modifier and Type Field Description private java.util.concurrent.atomic.AtomicReference<java.util.function.Function<Unit,Try<A>>>Try.Delayed. runReferenceMethods in io.atlassian.fugue that return Try Modifier and Type Method Description default Try<A>Checked.Supplier. attempt()private <B> Try<B>Try.Delayed. composeDelayed(java.util.function.Function<Try<A>,Try<B>> f)static <A,E extends java.lang.Exception>
Try<A>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>Try. delayed(java.util.function.Supplier<Try<A>> supplier)Creates a delayed Try, which will return either a Failure or a Success when evaluated.private Try<A>Try.Delayed. eval()static <A> Try<A>Try. failure(java.lang.Exception e)Creates a new failureTry<A>Try.Delayed. filterOrElse(java.util.function.Predicate<? super A> p, java.util.function.Supplier<java.lang.Exception> orElseSupplier)Try<A>Try.Failure. filterOrElse(java.util.function.Predicate<? super A> p, java.util.function.Supplier<java.lang.Exception> orElseSupplier)abstract Try<A>Try. filterOrElse(java.util.function.Predicate<? super A> p, java.util.function.Supplier<java.lang.Exception> orElseSupplier)Return aSuccessif this is aSuccessand the contained values satisfies the given predicate.Try<A>Try.Success. filterOrElse(java.util.function.Predicate<? super A> p, java.util.function.Supplier<java.lang.Exception> orElseSupplier)<B> Try<B>Try.Delayed. flatMap(java.util.function.Function<? super A,Try<B>> f)<B> Try<B>Try.Failure. flatMap(java.util.function.Function<? super A,Try<B>> f)abstract <B> Try<B>Try. flatMap(java.util.function.Function<? super A,Try<B>> f)Binds the given function across the success value if it is one.<B> Try<B>Try.Success. flatMap(java.util.function.Function<? super A,Try<B>> f)static <A> Try<A>Try. flatten(Try<Try<A>> t)Reduces a nested Try by a single level<B> Try<B>Try.Delayed. map(java.util.function.Function<? super A,? extends B> f)<B> Try<B>Try.Failure. map(java.util.function.Function<? super A,? extends B> f)abstract <B> Try<B>Try. map(java.util.function.Function<? super A,? extends B> f)Maps the given function to the value from this `Success` or returns this unchanged if a `Failure`.<B> Try<B>Try.Success. map(java.util.function.Function<? super A,? extends B> f)static <A,E extends java.lang.Exception>
Try<A>Checked. now(Checked.Supplier<A,E> s)Create a new Try representing the result of a potentially exception throwing operation.static <A,E extends java.lang.Exception>
Try<A>Checked. of(Checked.Supplier<A,E> s)Deprecated.since 4.6 This is being replaced withChecked.now(Supplier)to make it clear that the supplier is evaluated immediately.Try<A>Try.Delayed. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)Try<A>Try.Failure. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)Try<A>Try. orElse(Try<? extends A> orElse)If this is a success, return the same success.abstract Try<A>Try. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)If this is a success, return the same success.Try<A>Try.Success. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)<X extends java.lang.Exception>
Try<A>Try.Delayed. recover(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,A> f)Try<A>Try.Delayed. recover(java.util.function.Function<? super java.lang.Exception,A> f)<X extends java.lang.Exception>
Try<A>Try.Failure. recover(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,A> f)Try<A>Try.Failure. recover(java.util.function.Function<? super java.lang.Exception,A> f)abstract <X extends java.lang.Exception>
Try<A>Try. recover(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,A> f)Applies the given function `f` if this is a `Failure` with certain exception type otherwise leaves this unchanged.abstract Try<A>Try. recover(java.util.function.Function<? super java.lang.Exception,A> f)Applies the given function `f` if this is a `Failure` otherwise this unchanged if a 'Success'.<X extends java.lang.Exception>
Try<A>Try.Success. recover(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,A> f)Try<A>Try.Success. recover(java.util.function.Function<? super java.lang.Exception,A> f)<X extends java.lang.Exception>
Try<A>Try.Delayed. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Try<A>Try.Delayed. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)<X extends java.lang.Exception>
Try<A>Try.Failure. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Try<A>Try.Failure. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)abstract <X extends java.lang.Exception>
Try<A>Try. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Binds the given function across certain exception type if it is one, otherwise this unchanged.abstract Try<A>Try. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)Binds the given function across the failure value if it is one, otherwise this unchanged if a 'Success'.<X extends java.lang.Exception>
Try<A>Try.Success. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Try<A>Try.Success. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)static <A> Try<java.lang.Iterable<A>>Try. sequence(java.lang.Iterable<Try<A>> trys)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>Try. sequence(java.lang.Iterable<Try<T>> trys, java.util.stream.Collector<T,A,R> collector)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 Try Modifier and Type Method Description static <A,B,E extends java.lang.Exception>
java.util.function.Function<A,Try<B>>Checked. 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.private java.util.function.Function<Unit,Try<A>>Try.Delayed. getRunner()default java.util.function.Function<A,Try<B>>Checked.Function. lift()static <A,B,E extends java.lang.Exception>
java.util.function.Function<A,Try<B>>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.static <A> java.util.stream.Collector<Try<A>,?,Try<java.util.List<A>>>FugueCollectors. toTrySuccess()Collect the right values if there are only successes, otherwise return the first failure encountered.static <A> java.util.stream.Collector<Try<A>,?,Try<java.util.List<A>>>FugueCollectors. toTrySuccess()Collect the right values if there are only successes, otherwise return the first failure encountered.static <A,B,C>
java.util.stream.Collector<Try<A>,?,Try<C>>FugueCollectors. toTrySuccess(java.util.stream.Collector<A,B,C> aCollector)Collect the right values if there are only successes, otherwise return the first failure encountered.static <A,B,C>
java.util.stream.Collector<Try<A>,?,Try<C>>FugueCollectors. toTrySuccess(java.util.stream.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 Try Modifier and Type Method Description static <A> Try<A>Try. flatten(Try<Try<A>> t)Reduces a nested Try by a single levelTry<A>Try. orElse(Try<? extends A> orElse)If this is a success, return the same success.Method parameters in io.atlassian.fugue with type arguments of type Try Modifier and Type Method Description private <B> Try<B>Try.Delayed. composeDelayed(java.util.function.Function<Try<A>,Try<B>> f)private <B> Try<B>Try.Delayed. composeDelayed(java.util.function.Function<Try<A>,Try<B>> f)static <A> Try<A>Try. delayed(java.util.function.Supplier<Try<A>> supplier)Creates a delayed Try, which will return either a Failure or a Success when evaluated.<B> Try<B>Try.Delayed. flatMap(java.util.function.Function<? super A,Try<B>> f)<B> Try<B>Try.Failure. flatMap(java.util.function.Function<? super A,Try<B>> f)abstract <B> Try<B>Try. flatMap(java.util.function.Function<? super A,Try<B>> f)Binds the given function across the success value if it is one.<B> Try<B>Try.Success. flatMap(java.util.function.Function<? super A,Try<B>> f)static <A> Try<A>Try. flatten(Try<Try<A>> t)Reduces a nested Try by a single level(package private) static <A> Try.Delayed<A>Try.Delayed. fromSupplier(java.util.function.Supplier<Try<A>> delayed)Try<A>Try.Delayed. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)Try<A>Try.Failure. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)abstract Try<A>Try. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)If this is a success, return the same success.Try<A>Try.Success. orElse(java.util.function.Supplier<? extends Try<? extends A>> orElse)<X extends java.lang.Exception>
Try<A>Try.Delayed. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Try<A>Try.Delayed. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)<X extends java.lang.Exception>
Try<A>Try.Failure. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Try<A>Try.Failure. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)abstract <X extends java.lang.Exception>
Try<A>Try. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Binds the given function across certain exception type if it is one, otherwise this unchanged.abstract Try<A>Try. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)Binds the given function across the failure value if it is one, otherwise this unchanged if a 'Success'.<X extends java.lang.Exception>
Try<A>Try.Success. recoverWith(java.lang.Class<X> exceptionType, java.util.function.Function<? super X,Try<A>> f)Try<A>Try.Success. recoverWith(java.util.function.Function<? super java.lang.Exception,Try<A>> f)static <A> Try<java.lang.Iterable<A>>Try. sequence(java.lang.Iterable<Try<A>> trys)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>Try. sequence(java.lang.Iterable<Try<T>> trys, java.util.stream.Collector<T,A,R> collector)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 Constructor Description Delayed(java.util.function.Function<Unit,Try<A>> run) -
Uses of Try in io.atlassian.fugue.extensions.step
Fields in io.atlassian.fugue.extensions.step declared as Try Modifier and Type Field Description private Try<A>TryStep1. try1private Try<A>TryStep2. try1private Try<A>TryStep3. try1private Try<A>TryStep4. try1private Try<A>TryStep5. try1private Try<A>TryStep6. try1private Try<B>TryStep2. try2private Try<B>TryStep3. try2private Try<B>TryStep4. try2private Try<B>TryStep5. try2private Try<B>TryStep6. try2private Try<C>TryStep3. try3private Try<C>TryStep4. try3private Try<C>TryStep5. try3private Try<C>TryStep6. try3private Try<D>TryStep4. try4private Try<D>TryStep5. try4private Try<D>TryStep6. try4private Try<E>TryStep5. try5private Try<E>TryStep6. try5private Try<F>TryStep6. try6Methods in io.atlassian.fugue.extensions.step that return Try Modifier and Type Method Description <Z> Try<Z>TryStep1. yield(java.util.function.Function<? super A,Z> functor)Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z>TryStep2. yield(java.util.function.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>TryStep3. yield(Function3<? super A,? super B,? super C,Z> functor)Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z>TryStep4. yield(Function4<? super A,? super B,? super C,? super D,Z> functor)Terminating step expression, that will provide the previous steps to this function and return the result as aSuccess<Z> Try<Z>TryStep5. yield(Function5<? super A,? super B,? super C,? super D,? super E,Z> functor)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 Try Modifier and Type Method Description static <A> TryStep1<A>Steps. begin(Try<A> aTry)Begin a new Steps expresison, using theTrytype.Method parameters in io.atlassian.fugue.extensions.step with type arguments of type Try Modifier and Type Method Description <B> TryStep2<A,B>TryStep1. then(java.util.function.Function<? super A,Try<B>> functor)Apply the provided function with the previous Step results.<B> TryStep2<A,B>TryStep1. then(java.util.function.Supplier<Try<B>> supplier)Apply the provided supplier with the previous Step results.<C> TryStep3<A,B,C>TryStep2. then(java.util.function.BiFunction<? super A,? super B,Try<C>> functor)Apply the provided function with the previous Step results.<C> TryStep3<A,B,C>TryStep2. then(java.util.function.Supplier<Try<C>> supplier)Apply the provided supplier with the previous Step results.<D> TryStep4<A,B,C,D>TryStep3. then(Function3<? super A,? super B,? super C,Try<D>> functor)Apply the provided function with the previous Step results.<D> TryStep4<A,B,C,D>TryStep3. then(java.util.function.Supplier<Try<D>> supplier)Apply the provided supplier with the previous Step results.<E> TryStep5<A,B,C,D,E>TryStep4. then(Function4<? super A,? super B,? super C,? super D,Try<E>> functor)Apply the provided function with the previous Step results.<E> TryStep5<A,B,C,D,E>TryStep4. then(java.util.function.Supplier<Try<E>> supplier)Apply the provided supplier with the previous Step results.<F> TryStep6<A,B,C,D,E,F>TryStep5. then(Function5<? super A,? super B,? super C,? super D,? super E,Try<F>> functor)Apply the provided function with the previous Step results.<F> TryStep6<A,B,C,D,E,F>TryStep5. then(java.util.function.Supplier<Try<F>> supplier)Apply the provided supplier with the previous Step results.Constructors in io.atlassian.fugue.extensions.step with parameters of type Try Constructor Description TryStep1(Try<A> try1)TryStep2(Try<A> try1, Try<B> try2)TryStep3(Try<A> try1, Try<B> try2, Try<C> try3)TryStep4(Try<A> try1, Try<B> try2, Try<C> try3, Try<D> try4)TryStep5(Try<A> try1, Try<B> try2, Try<C> try3, Try<D> try4, Try<E> try5)TryStep6(Try<A> try1, Try<B> try2, Try<C> try3, Try<D> try4, Try<E> try5, Try<F> try6) -
Uses of Try in io.atlassian.fugue.hamcrest
Methods in io.atlassian.fugue.hamcrest that return types with arguments of type Try Modifier and Type Method Description static org.hamcrest.Matcher<Try<?>>TryMatchers. isFailure()static org.hamcrest.Matcher<Try<?>>TryMatchers. isFailure(org.hamcrest.Matcher<? super java.lang.Exception> subMatcher)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 Try Modifier and Type Method Description protected 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)
-