public static enum DataResult.Instance extends Enum<instance DataResult<_>> implements Applicative DataResult<_>
DataResult
.Enum Constant and Description |
---|
INSTANCE
The type instance.
|
Modifier and Type | Method and Description |
---|---|
<A,R> DataResult<R> |
ap(DataResult<(A) -> R> func,
DataResult<A> arg)
Maps the contents of
arg from A to R using a wrapped transformation function. |
<A,B,R> DataResult<R> |
ap2(DataResult<(A,B) -> R> func,
DataResult<A> a,
DataResult<B> b)
|
<T1,T2,T3,R> |
ap3(DataResult<(T1,T2,T3) -> R> func,
DataResult<T1> t1,
DataResult<T2> t2,
DataResult<T3> t3)
Maps the contents of the input containers to a container of
R using a wrapped Function3 . |
<A,R> (DataResult<A>) -> DataResult<R> |
lift1(DataResult<(A) -> R> function)
Lifts a wrapped transformation function into a function between containers.
|
<T,R> DataResult<R> |
map((? super T) -> ? extends R func,
DataResult<T> ts)
Maps the contents of
ts from T to R using the func . |
<A> DataResult<A> |
point(A a)
Wraps a value in a container, for example an object in a list.
|
static instance DataResult<_> |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static instance DataResult<_>[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
public static final instance DataResult<_> INSTANCE
public static instance DataResult<_>[] values()
for (DataResult.Instance c : DataResult.Instance.values()) System.out.println(c);
public static instance DataResult<_> valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic <T,R> DataResult<R> map((? super T) -> ? extends R func, DataResult<T> ts)
Functor
ts
from T
to R
using the func
.map
in interface Functor DataResult<_>
T
- The input type.R
- The output type.func
- The transformation function.ts
- The input container that will be transformed.public <A> DataResult<A> point(A a)
Applicative
point
in interface Applicative DataResult<_>
A
- The type of the value.a
- The input value.public <A,R> (DataResult<A>) -> DataResult<R> lift1(DataResult<(A) -> R> function)
Applicative
lift1
in interface Applicative DataResult<_>
A
- The input type.R
- The output type.function
- The container containing the transformation function.public <A,R> DataResult<R> ap(DataResult<(A) -> R> func, DataResult<A> arg)
Applicative
arg
from A
to R
using a wrapped transformation function.ap
in interface Applicative DataResult<_>
A
- The input type.R
- The output type.func
- The wrapped transformation function.arg
- The input container that will be transformed.public <A,B,R> DataResult<R> ap2(DataResult<(A,B) -> R> func, DataResult<A> a, DataResult<B> b)
Applicative
ap2
in interface Applicative DataResult<_>
A
- The first input type.B
- The second input type.R
- The output type.func
- The wrapped transformation function.a
- The first input container that will be transformed.b
- The second input container that will be transformed.public <T1,T2,T3,R> DataResult<R> ap3(DataResult<(T1,T2,T3) -> R> func, DataResult<T1> t1, DataResult<T2> t2, DataResult<T3> t3)
Applicative
R
using a wrapped Function3
.ap3
in interface Applicative DataResult<_>
T1
- The first input type.T2
- The second input type.T3
- The third input type.R
- The output type.func
- The wrapped transformation function.t1
- The first input container that will be transformed.t2
- The second input container that will be transformed.t3
- The third input container that will be transformed.