A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typepublic abstract class Choice8<A,B,C,D,E,F,G,H> extends Object implements CoProduct8<A,B,C,D,E,F,G,H,Choice8<A,B,C,D,E,F,G,H>>, MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>, Bifunctor<G,H,Choice8<A,B,C,D,E,F,?,?>>, Traversable<H,Choice8<A,B,C,D,E,F,G,?>>
CoProduct8
.Choice7
Modifier and Type | Method and Description |
---|---|
static <A,B,C,D,E,F,G,H> |
a(A a)
Static factory method for wrapping a value of type
A in a Choice8 . |
static <A,B,C,D,E,F,G,H> |
b(B b)
Static factory method for wrapping a value of type
B in a Choice8 . |
<I,J> Choice8<A,B,C,D,E,F,I,J> |
biMap(Fn1<? super G,? extends I> lFn,
Fn1<? super H,? extends J> rFn)
Dually map covariantly over both the left and right parameters.
|
<I> Choice8<A,B,C,D,E,F,I,H> |
biMapL(Fn1<? super G,? extends I> fn)
Covariantly map over the left parameter.
|
<I> Choice8<A,B,C,D,E,F,G,I> |
biMapR(Fn1<? super H,? extends I> fn)
Covariantly map over the right parameter.
|
static <A,B,C,D,E,F,G,H> |
c(C c)
Static factory method for wrapping a value of type
C in a Choice8 . |
Choice7<A,B,C,D,E,F,G> |
converge(Fn1<? super H,? extends CoProduct7<A,B,C,D,E,F,G,?>> convergenceFn)
Converge this coproduct down to a lower order coproduct by mapping the last possible type into an earlier
possible type.
|
static <A,B,C,D,E,F,G,H> |
d(D d)
Static factory method for wrapping a value of type
D in a Choice8 . |
<I> Choice8<A,B,C,D,E,F,G,I> |
discardL(Applicative<I,Choice8<A,B,C,D,E,F,G,?>> appB)
Sequence both this
Applicative and appB , discarding this Applicative's
result and returning appB . |
<I> Choice8<A,B,C,D,E,F,G,H> |
discardR(Applicative<I,Choice8<A,B,C,D,E,F,G,?>> appB)
Sequence both this
Applicative and appB , discarding appB's result and
returning this Applicative . |
static <A,B,C,D,E,F,G,H> |
e(E e)
Static factory method for wrapping a value of type
E in a Choice8 . |
static <A,B,C,D,E,F,G,H> |
f(F f)
Static factory method for wrapping a value of type
F in a Choice8 . |
<I> Choice8<A,B,C,D,E,F,G,I> |
flatMap(Fn1<? super H,? extends Monad<I,Choice8<A,B,C,D,E,F,G,?>>> fn)
Chain dependent computations that may continue or short-circuit based on previous results.
|
<I> Choice8<A,B,C,D,E,F,G,I> |
fmap(Fn1<? super H,? extends I> fn)
Covariantly transmute this functor's parameter using the given mapping function.
|
static <A,B,C,D,E,F,G,H> |
g(G g)
Static factory method for wrapping a value of type
G in a Choice8 . |
static <A,B,C,D,E,F,G,H> |
h(H h)
Static factory method for wrapping a value of type
H in a Choice8 . |
<I> Lazy<Choice8<A,B,C,D,E,F,G,I>> |
lazyZip(Lazy<? extends Applicative<Fn1<? super H,? extends I>,Choice8<A,B,C,D,E,F,G,?>>> lazyAppFn)
Given a
lazy instance of this applicative over a mapping function, "zip" the two instances together
using whatever application semantics the current applicative supports. |
Tuple8<Maybe<A>,Maybe<B>,Maybe<C>,Maybe<D>,Maybe<E>,Maybe<F>,Maybe<G>,Maybe<H>> |
project()
Specialize this choice's projection to a
Tuple8 . |
<I> Choice8<A,B,C,D,E,F,G,I> |
pure(I i)
Lift the value
b into this applicative functor. |
static <A,B,C,D,E,F,G> |
pureChoice()
|
<I> Choice8<A,B,C,D,E,F,G,I> |
trampolineM(Fn1<? super H,? extends MonadRec<RecursiveResult<H,I>,Choice8<A,B,C,D,E,F,G,?>>> fn)
Given some operation yielding a
RecursiveResult inside this MonadRec , internally trampoline the
operation until it yields a termination instruction. |
<I,App extends Applicative<?,App>,TravB extends Traversable<I,Choice8<A,B,C,D,E,F,G,?>>,AppTrav extends Applicative<TravB,App>> |
traverse(Fn1<? super H,? extends Applicative<I,App>> fn,
Fn1<? super TravB,? extends AppTrav> pure)
Apply
fn to 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. |
<I> Choice8<A,B,C,D,E,F,G,I> |
zip(Applicative<Fn1<? super H,? extends I>,Choice8<A,B,C,D,E,F,G,?>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using
whatever application semantics the current applicative supports.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Tuple8<Maybe<A>,Maybe<B>,Maybe<C>,Maybe<D>,Maybe<E>,Maybe<F>,Maybe<G>,Maybe<H>> project()
Tuple8
.public Choice7<A,B,C,D,E,F,G> converge(Fn1<? super H,? extends CoProduct7<A,B,C,D,E,F,G,?>> convergenceFn)
public <I> Choice8<A,B,C,D,E,F,G,I> fmap(Fn1<? super H,? extends I> fn)
fmap
in interface Applicative<H,Choice8<A,B,C,D,E,F,G,?>>
fmap
in interface Functor<H,Choice8<A,B,C,D,E,F,G,?>>
fmap
in interface Monad<H,Choice8<A,B,C,D,E,F,G,?>>
fmap
in interface MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>
fmap
in interface Traversable<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the new parameter typefn
- the mapping functionpublic <I> Choice8<A,B,C,D,E,F,I,H> biMapL(Fn1<? super G,? extends I> fn)
biMapL
in interface Bifunctor<G,H,Choice8<A,B,C,D,E,F,?,?>>
biMapL
in interface BoundedBifunctor<G,H,Object,Object,Choice8<A,B,C,D,E,F,?,?>>
I
- the new left parameter typefn
- the mapping functionpublic <I> Choice8<A,B,C,D,E,F,G,I> biMapR(Fn1<? super H,? extends I> fn)
biMapR(f) == fmap(f)
.biMapR
in interface Bifunctor<G,H,Choice8<A,B,C,D,E,F,?,?>>
biMapR
in interface BoundedBifunctor<G,H,Object,Object,Choice8<A,B,C,D,E,F,?,?>>
I
- the new right parameter typefn
- the mapping functionpublic <I,J> Choice8<A,B,C,D,E,F,I,J> biMap(Fn1<? super G,? extends I> lFn, Fn1<? super H,? extends J> rFn)
biMapL(lFn).biMapR(rFn)
.biMap
in interface Bifunctor<G,H,Choice8<A,B,C,D,E,F,?,?>>
biMap
in interface BoundedBifunctor<G,H,Object,Object,Choice8<A,B,C,D,E,F,?,?>>
I
- the new left parameter typeJ
- the new right parameter typelFn
- the left parameter mapping functionrFn
- the right parameter mapping functionpublic <I> Choice8<A,B,C,D,E,F,G,I> pure(I i)
b
into this applicative functor.pure
in interface Applicative<H,Choice8<A,B,C,D,E,F,G,?>>
pure
in interface Monad<H,Choice8<A,B,C,D,E,F,G,?>>
pure
in interface MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the type of the returned applicative's parameteri
- the valuepublic <I> Choice8<A,B,C,D,E,F,G,I> zip(Applicative<Fn1<? super H,? extends I>,Choice8<A,B,C,D,E,F,G,?>> appFn)
zip
in interface Applicative<H,Choice8<A,B,C,D,E,F,G,?>>
zip
in interface Monad<H,Choice8<A,B,C,D,E,F,G,?>>
zip
in interface MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the resulting applicative parameter typeappFn
- the other applicative instancepublic <I> Lazy<Choice8<A,B,C,D,E,F,G,I>> lazyZip(Lazy<? extends Applicative<Fn1<? super H,? extends I>,Choice8<A,B,C,D,E,F,G,?>>> lazyAppFn)
lazy
instance of this applicative over a mapping function, "zip" the two instances together
using whatever application semantics the current applicative supports. This is useful for applicatives that
support lazy evaluation and early termination.lazyZip
in interface Applicative<H,Choice8<A,B,C,D,E,F,G,?>>
lazyZip
in interface Monad<H,Choice8<A,B,C,D,E,F,G,?>>
lazyZip
in interface MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the resulting applicative parameter typelazyAppFn
- the lazy other applicative instanceMaybe
,
Either
public <I> Choice8<A,B,C,D,E,F,G,I> discardL(Applicative<I,Choice8<A,B,C,D,E,F,G,?>> appB)
Applicative
and appB
, discarding this Applicative's
result and returning appB
. This is generally useful for sequentially performing side-effects.discardL
in interface Applicative<H,Choice8<A,B,C,D,E,F,G,?>>
discardL
in interface Monad<H,Choice8<A,B,C,D,E,F,G,?>>
discardL
in interface MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the type of the returned Applicative's parameterappB
- the other Applicativepublic <I> Choice8<A,B,C,D,E,F,G,H> discardR(Applicative<I,Choice8<A,B,C,D,E,F,G,?>> appB)
Applicative
and appB
, discarding appB's
result and
returning this Applicative
. This is generally useful for sequentially performing side-effects.discardR
in interface Applicative<H,Choice8<A,B,C,D,E,F,G,?>>
discardR
in interface Monad<H,Choice8<A,B,C,D,E,F,G,?>>
discardR
in interface MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the type of appB's parameterappB
- the other Applicativepublic <I> Choice8<A,B,C,D,E,F,G,I> flatMap(Fn1<? super H,? extends Monad<I,Choice8<A,B,C,D,E,F,G,?>>> fn)
public <I> Choice8<A,B,C,D,E,F,G,I> trampolineM(Fn1<? super H,? extends MonadRec<RecursiveResult<H,I>,Choice8<A,B,C,D,E,F,G,?>>> fn)
RecursiveResult
inside this MonadRec
, internally trampoline the
operation until it yields a termination
instruction.
Stack-safety depends on implementations guaranteeing that the growth of the call stack is a constant factor independent of the number of invocations of the operation. For various examples of how this can be achieved in stereotypical circumstances, see the referenced types.
trampolineM
in interface MonadRec<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the ultimate resulting carrier typefn
- the function to internally trampolineMonadRec
for a basic implementation
,
for a {@link CoProduct2 coproduct} implementation
,
for an implementation leveraging an already stack-safe {@link Monad#flatMap(Fn1)}
,
for a {@link MonadT monad transformer} implementation
public <I,App extends Applicative<?,App>,TravB extends Traversable<I,Choice8<A,B,C,D,E,F,G,?>>,AppTrav extends Applicative<TravB,App>> AppTrav traverse(Fn1<? super H,? extends Applicative<I,App>> fn, Fn1<? super TravB,? extends AppTrav> pure)
fn
to 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.traverse
in interface Traversable<H,Choice8<A,B,C,D,E,F,G,?>>
I
- the resulting element typeApp
- the result applicative typeTravB
- this Traversable instance over BAppTrav
- the full inferred resulting type from the traversalfn
- the function to applypure
- the applicative pure functionpublic static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> a(A a)
A
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typea
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> b(B b)
B
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typeb
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> c(C c)
C
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typec
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> d(D d)
D
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typed
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> e(E e)
E
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typee
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> f(F f)
F
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typef
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> g(G g)
G
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typeg
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G,H> Choice8<A,B,C,D,E,F,G,H> h(H h)
H
in a Choice8
.A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typeH
- the eighth possible typeh
- the valueChoice8
<A, B, C, D, E, F, G, H>public static <A,B,C,D,E,F,G> Pure<Choice8<A,B,C,D,E,F,G,?>> pureChoice()
A
- the first possible typeB
- the second possible typeC
- the third possible typeD
- the fourth possible typeE
- the fifth possible typeF
- the sixth possible typeG
- the seventh possible typePure
instance