Uses of Interface
com.jnape.palatable.lambda.functions.Fn0
-
-
Uses of Fn0 in com.jnape.palatable.lambda.adt
Methods in com.jnape.palatable.lambda.adt with parameters of type Fn0 Modifier and Type Method Description Either<L,R>
Either. filter(Fn1<? super R,? extends java.lang.Boolean> pred, Fn0<L> leftFn0)
If this is a right value, applypred
to it.static <L,R>
Either<L,R>Either. fromMaybe(Maybe<R> maybe, Fn0<L> leftFn0)
Convert aMaybe
<R> into anEither<L, R>
, supplying the left value fromleftFn
in the case ofMaybe.nothing()
.A
Maybe. orElseGet(Fn0<A> otherFn0)
If the value is present, return it; otherwise, return the value supplied byotherSupplier
.<E extends java.lang.Throwable>
AMaybe. orElseThrow(Fn0<? extends E> throwableSupplier)
If the value is present, return it; otherwise, throw theThrowable
supplied bythrowableSupplier
.<L> Either<L,A>
Maybe. toEither(Fn0<L> lFn0)
If this value is absent, return the value supplied bylSupplier
wrapped inEither.left
.static <R> Either<java.lang.Throwable,R>
Either. trying(Fn0<? extends R> fn0)
Attempt to execute theFn0
, returning its result in a right value.static <L,R>
Either<L,R>Either. trying(Fn0<? extends R> fn0, Fn1<? super java.lang.Throwable,? extends L> leftFn)
Attempt to execute theFn0
, returning its result in a right value.static <A> Try<A>
Try. trying(Fn0<? extends A> supplier)
Executesupplier
, returning a successA
or a failure of the thrownThrowable
.static <A extends java.lang.AutoCloseable,B extends java.lang.AutoCloseable,C extends java.lang.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 ofwithResources
that cascades two dependent resource creations via nested calls.static <A extends java.lang.AutoCloseable,B extends java.lang.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 ofwithResources
that cascades dependent resource creation via nested calls.static <A extends java.lang.AutoCloseable,B>
Try<B>Try. withResources(Fn0<? extends A> fn0, Fn1<? super A,? extends Try<? extends B>> fn)
-
Uses of Fn0 in com.jnape.palatable.lambda.functions
Methods in com.jnape.palatable.lambda.functions that return Fn0 Modifier and Type Method Description default <B> Fn0<B>
Fn0. diMapR(Fn1<? super A,? extends B> fn)
default <B> Fn0<B>
Fn0. discardL(Applicative<B,Fn1<Unit,?>> appB)
default <B> Fn0<A>
Fn0. discardR(Applicative<B,Fn1<Unit,?>> appB)
default <B> Fn0<B>
Fn0. flatMap(Fn1<? super A,? extends Monad<B,Fn1<Unit,?>>> f)
default <B> Fn0<B>
Fn0. fmap(Fn1<? super A,? extends B> f)
static <A> Fn0<A>
Fn0. fn0(Fn0<A> fn)
Static factory method for coercing a lambda to anFn0
.static <A> Fn0<A>
Fn0. fn0(Fn1<Unit,A> fn)
static <A> Fn0<A>
Fn0. fromCallable(java.util.concurrent.Callable<A> callable)
Convenience method for converting aCallable
to anFn0
.static <A> Fn0<A>
Fn0. fromSupplier(java.util.function.Supplier<A> supplier)
Convenience method for converting aSupplier
to anFn0
.default <B> Fn0<B>
Fn0. pure(B b)
default Fn0<B>
Fn1. thunk(A a)
default <B> Fn0<B>
Fn0. zip(Fn2<Unit,A,B> appFn)
default <B> Fn0<B>
Fn0. zip(Applicative<Fn1<? super A,? extends B>,Fn1<Unit,?>> appFn)
Methods in com.jnape.palatable.lambda.functions with parameters of type Fn0 Modifier and Type Method Description static <A> Fn0<A>
Fn0. fn0(Fn0<A> fn)
Static factory method for coercing a lambda to anFn0
. -
Uses of Fn0 in com.jnape.palatable.lambda.functions.builtin.fn2
Methods in com.jnape.palatable.lambda.functions.builtin.fn2 with parameters of type Fn0 Modifier and Type Method Description C
ToCollection. checkedApply(Fn0<C> cFn0, java.lang.Iterable<A> as)
M
ToMap. checkedApply(Fn0<M> mFn0, java.lang.Iterable<? extends java.util.Map.Entry<K,V>> entries)
static <A,C extends java.util.Collection<A>>
Fn1<java.lang.Iterable<A>,C>ToCollection. toCollection(Fn0<C> cFn0)
static <A,C extends java.util.Collection<A>>
CToCollection. toCollection(Fn0<C> cFn0, java.lang.Iterable<A> as)
static <K,V,M extends java.util.Map<K,V>>
Fn1<java.lang.Iterable<? extends java.util.Map.Entry<K,V>>,M>ToMap. toMap(Fn0<M> mFn0)
static <K,V,M extends java.util.Map<K,V>>
MToMap. toMap(Fn0<M> mFn0, java.lang.Iterable<? extends java.util.Map.Entry<K,V>> entries)
-
Uses of Fn0 in com.jnape.palatable.lambda.functions.builtin.fn4
Methods in com.jnape.palatable.lambda.functions.builtin.fn4 with parameters of type Fn0 Modifier and Type Method Description java.lang.Iterable<A>
RateLimit. checkedApply(Fn0<java.time.Instant> instantFn0, java.lang.Long limit, java.time.Duration duration, java.lang.Iterable<A> as)
static <A> Fn3<java.lang.Long,java.time.Duration,java.lang.Iterable<A>,java.lang.Iterable<A>>
RateLimit. rateLimit(Fn0<java.time.Instant> instantFn0)
static <A> Fn2<java.time.Duration,java.lang.Iterable<A>,java.lang.Iterable<A>>
RateLimit. rateLimit(Fn0<java.time.Instant> instantFn0, java.lang.Long limit)
static <A> Fn1<java.lang.Iterable<A>,java.lang.Iterable<A>>
RateLimit. rateLimit(Fn0<java.time.Instant> instantFn0, java.lang.Long limit, java.time.Duration duration)
static <A> java.lang.Iterable<A>
RateLimit. rateLimit(Fn0<java.time.Instant> instantFn0, java.lang.Long limit, java.time.Duration duration, java.lang.Iterable<A> as)
-
Uses of Fn0 in com.jnape.palatable.lambda.functor.builtin
Fields in com.jnape.palatable.lambda.functor.builtin declared as Fn0 Modifier and Type Field Description private Fn0<A>
Lazy.Later. fn0
Methods in com.jnape.palatable.lambda.functor.builtin with parameters of type Fn0 Modifier and Type Method Description static <A> Lazy<A>
Lazy. lazy(Fn0<A> fn0)
Wrap a computation in a lazy computation.Constructors in com.jnape.palatable.lambda.functor.builtin with parameters of type Fn0 Constructor Description Later(Fn0<A> fn0)
-
Uses of Fn0 in com.jnape.palatable.lambda.internal.iteration
Fields in com.jnape.palatable.lambda.internal.iteration declared as Fn0 Modifier and Type Field Description private Fn0<java.util.Iterator<A>>
ConsingIterator. asSupplier
Fields in com.jnape.palatable.lambda.internal.iteration with type parameters of type Fn0 Modifier and Type Field Description private java.util.Set<Tuple3<java.lang.Long,java.time.Duration,Fn0<java.time.Instant>>>
RateLimitingIterable. rateLimits
private java.util.Set<Tuple3<java.lang.Long,java.time.Duration,Fn0<java.time.Instant>>>
RateLimitingIterator. rateLimits
private java.util.Map<Tuple3<java.lang.Long,java.time.Duration,Fn0<java.time.Instant>>,java.util.List<java.time.Instant>>
RateLimitingIterator. timeSlicesByRateLimit
Methods in com.jnape.palatable.lambda.internal.iteration with parameters of type Fn0 Modifier and Type Method Description private <R> R
TrampoliningIterator. pruneAfter(Fn0<? extends R> fn)
Method parameters in com.jnape.palatable.lambda.internal.iteration with type arguments of type Fn0 Modifier and Type Method Description private void
RateLimitingIterator. awaitNextTimeSliceForRateLimit(Tuple3<java.lang.Long,java.time.Duration,Fn0<java.time.Instant>> rateLimit)
private boolean
RateLimitingIterator. rateLimitExhaustedInTimeSlice(Tuple3<java.lang.Long,java.time.Duration,Fn0<java.time.Instant>> rateLimit)
Constructor parameters in com.jnape.palatable.lambda.internal.iteration with type arguments of type Fn0 Constructor Description RateLimitingIterable(java.lang.Iterable<A> as, java.util.Set<Tuple3<java.lang.Long,java.time.Duration,Fn0<java.time.Instant>>> rateLimits)
RateLimitingIterator(java.util.Iterator<A> asIterator, java.util.Set<Tuple3<java.lang.Long,java.time.Duration,Fn0<java.time.Instant>>> rateLimits)
-
Uses of Fn0 in com.jnape.palatable.lambda.io
Methods in com.jnape.palatable.lambda.io with parameters of type Fn0 Modifier and Type Method Description static <A> IO<A>
IO. externallyManaged(Fn0<java.util.concurrent.CompletableFuture<A>> supplier)
Static factory method for creating anIO
from an externally managed source ofcompletable futures
.static <A> IO<A>
IO. io(Fn0<? extends A> fn0)
Static factory method for coercing a lambda to anIO
. -
Uses of Fn0 in com.jnape.palatable.lambda.monad.transformer.builtin
Fields in com.jnape.palatable.lambda.monad.transformer.builtin with type parameters of type Fn0 Modifier and Type Field Description private ImmutableQueue<Choice2<Fn0<MonadRec<Maybe<Tuple2<A,IterateT<M,A>>>,M>>,MonadRec<A,M>>>
IterateT. spine
Methods in com.jnape.palatable.lambda.monad.transformer.builtin with parameters of type Fn0 Modifier and Type Method Description static <M extends MonadRec<?,M>,A>
IterateT<M,A>IterateT. suspended(Fn0<MonadRec<Maybe<Tuple2<A,IterateT<M,A>>>,M>> thunk, Pure<M> pureM)
<C extends java.util.Collection<A>,MAS extends MonadRec<C,M>>
MASIterateT. toCollection(Fn0<C> cFn0)
Force the underlying spine of thisIterateT
into aCollection
of typeC
inside the context of the monadic effect, using the providedcFn0
to construct the initial instance.Constructor parameters in com.jnape.palatable.lambda.monad.transformer.builtin with type arguments of type Fn0 Constructor Description IterateT(Pure<M> pureM, ImmutableQueue<Choice2<Fn0<MonadRec<Maybe<Tuple2<A,IterateT<M,A>>>,M>>,MonadRec<A,M>>> spine)
-
Uses of Fn0 in com.jnape.palatable.lambda.monoid
Methods in com.jnape.palatable.lambda.monoid with parameters of type Fn0 Modifier and Type Method Description static <A> Monoid<A>
Monoid. monoid(Semigroup<A> semigroup, Fn0<A> identityFn0)
-
Uses of Fn0 in com.jnape.palatable.lambda.monoid.builtin
Methods in com.jnape.palatable.lambda.monoid.builtin with parameters of type Fn0 Modifier and Type Method Description static <A,C extends java.util.Collection<A>>
Monoid<C>AddAll. addAll(Fn0<C> collectionFn0)
static <A,C extends java.util.Collection<A>>
Fn1<C,C>AddAll. addAll(Fn0<C> collectionFn0, C xs)
static <A,C extends java.util.Collection<A>>
CAddAll. addAll(Fn0<C> collectionFn0, C xs, C ys)
Monoid<C>
AddAll. checkedApply(Fn0<C> cFn0)
Monoid<java.util.Map<K,V>>
MergeMaps. checkedApply(Fn0<java.util.Map<K,V>> mFn0, Semigroup<V> semigroup)
static <K,V>
MonoidFactory<Semigroup<V>,java.util.Map<K,V>>MergeMaps. mergeMaps(Fn0<java.util.Map<K,V>> mFn0)
static <K,V>
Monoid<java.util.Map<K,V>>MergeMaps. mergeMaps(Fn0<java.util.Map<K,V>> mFn0, Semigroup<V> semigroup)
static <K,V>
Fn1<java.util.Map<K,V>,java.util.Map<K,V>>MergeMaps. mergeMaps(Fn0<java.util.Map<K,V>> mFn0, Semigroup<V> semigroup, java.util.Map<K,V> x)
static <K,V>
java.util.Map<K,V>MergeMaps. mergeMaps(Fn0<java.util.Map<K,V>> mFn0, Semigroup<V> semigroup, java.util.Map<K,V> x, java.util.Map<K,V> y)
-