A
- The type of the contained value.public final class IdF<A> extends Object
The main feature of this class is its implementation of applicative functor operations. It's useful in cases where a functor is required but there is no existing functor that would be used.
IdF
.Modifier and Type | Class and Description |
---|---|
static class |
IdF.Instance
|
Modifier and Type | Field and Description |
---|---|
protected A |
value
The value contained in this
IdF . |
Modifier and Type | Method and Description |
---|---|
static <A> IdF<A> |
create(A a)
Creates an
IdF container for a value. |
static <A> A |
get(IdF<A> box)
Gets the value stored in an
App representing an IdF instance. |
A |
value()
Gets the value of this container.
|
protected final A value
IdF
.public A value()
public static <A> A get(IdF<A> box)
App
representing an IdF
instance.A
- The type of the contained value.box
- The boxed IdF
instance.ClassCastException
- If the box
is not an instance of IdF
.public static <A> IdF<A> create(A a)
IdF
container for a value.A
- The type of the contained value.a
- The value that will be stored.