Class UIO<A>
java.lang.Object
com.github.tonivade.purefun.effect.UIO<A>
- All Implemented Interfaces:
Applicable<UIO<?>,,A> Bindable<UIO<?>,,A> Effect<UIO<?>,,A> Mappable<UIO<?>,,A> Recoverable,UIOOf<A>,Kind<UIO<?>,A>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.tonivade.purefun.core.Applicable
Applicable.Map2<F extends Applicable<F,?>, A, B>, Applicable.Map3<F extends Applicable<F, ?>, A, B, C>, Applicable.Map4<F extends Applicable<F, ?>, A, B, C, D>, Applicable.Map5<F extends Applicable<F, ?>, A, B, C, D, E> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<B> UIO<B> <B> UIO<B> static <A> UIO<A> static <A extends AutoCloseable,B>
UIO<B> bracket(Kind<UIO<?>, ? extends A> acquire, Function1<? super A, ? extends Kind<UIO<?>, ? extends B>> use) static <A,B> UIO <B> bracket(Kind<UIO<?>, ? extends A> acquire, Function1<? super A, ? extends Kind<UIO<?>, ? extends B>> use, Consumer1<? super A> release) static <A,B> UIO <B> bracket(Kind<UIO<?>, ? extends A> acquire, Function1<? super A, ? extends Kind<UIO<?>, ? extends B>> use, Function1<? super A, ? extends Kind<UIO<?>, Unit>> release) static <A> UIO<A> static <A> UIO<A> exec(CheckedRunnable task) <B> UIO<B> private static <A> UIO<A> fork()static <T> UIO<T> fromEither(Either<Throwable, ? extends T> task) static <T> UIO<T> fromOption(Option<? extends T> task) static <T> UIO<T> fromPromise(Promise<? extends T> promise) static <T> UIO<T> liftEither(Function1<? super A, ? extends Either<Throwable, ? extends B>> function) liftOption(Function1<? super A, ? extends Option<? extends B>> function) <B> UIO<B> static <A> UIO<A> never()static <A,B, C> UIO <C> parMap2(Kind<UIO<?>, ? extends A> za, Kind<UIO<?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <A,B, C> UIO <C> parMap2(Executor executor, Kind<UIO<?>, ? extends A> za, Kind<UIO<?>, ? extends B> zb, Function2<? super A, ? super B, ? extends C> mapper) static <A> UIO<A> pure(A value) static <A> UIO<A> raiseError(Throwable throwable) recoverWith(Class<X> type, Function1<? super X, ? extends A> function) <B> UIO<B> <B> UIO<B> redeemWith(Function1<? super Throwable, ? extends Kind<UIO<?>, ? extends B>> mapError, Function1<? super A, ? extends Kind<UIO<?>, ? extends B>> map) repeat()repeat(int times) private static <T> UIO<T> retry()retry(int maxRetries) private static <T> UIO<T> runAsync()voidsafeRunAsync(Consumer1<? super Try<? extends A>> callback) voidsafeRunAsync(Executor executor, Consumer1<? super Try<? extends A>> callback) static <A> UIO<A> timed()toEIO()toPureIO()toRIO()toTask()toURIO()unit()<B> UIO<B> <B,C> UIO <C> Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.github.tonivade.purefun.core.Recoverable
sneakyThrow
-
Field Details
-
UNIT
-
instance
-
-
Constructor Details
-
UIO
-
-
Method Details
-
runAsync
-
runAsync
-
unsafeRunSync
-
safeRunSync
-
toPureIO
-
toEIO
-
toRIO
-
toURIO
-
toTask
-
safeRunAsync
-
safeRunAsync
-
map
-
flatMap
-
andThen
-
ap
-
recover
-
recoverWith
-
redeem
-
redeemWith
-
zip
-
zipLeft
-
zipRight
-
zipWith
-
fork
-
timeout
-
timeout
-
repeat
-
repeat
-
repeat
-
repeat
-
retry
-
retry
-
retry
-
retry
-
timed
-
forked
-
parMap2
-
parMap2
-
race
-
race
-
racePair
-
lift
-
liftOption
-
liftTry
-
liftEither
-
sleep
-
sleep
-
exec
-
pure
-
raiseError
-
defer
-
task
-
fromOption
-
fromTry
-
fromEither
-
fromPromise
-
never
-
async
-
cancellable
-
memoize
-
memoize
-
traverse
-
traverse
-
bracket
-
bracket
-
bracket
-
unit
-
fold
-
repeat
-
retry
-