Class Id<A>
- java.lang.Object
-
- com.jnape.palatable.lambda.functions.builtin.fn1.Id<A>
-
- Type Parameters:
A- The input/output type
- All Implemented Interfaces:
Fn1<A,A>,Applicative<A,Fn1<A,?>>,Cartesian<A,A,Fn1<?,?>>,Cocartesian<A,A,Fn1<?,?>>,Contravariant<A,Profunctor<?,A,Fn1<?,?>>>,Functor<A,Fn1<A,?>>,Profunctor<A,A,Fn1<?,?>>,Monad<A,Fn1<A,?>>,MonadReader<A,A,Fn1<A,?>>,MonadRec<A,Fn1<A,?>>,MonadWriter<A,A,Fn1<A,?>>
public final class Id<A> extends java.lang.Object implements Fn1<A,A>
The identity function.
-
-
Constructor Summary
Constructors Modifier Constructor Description privateId()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AcheckedApply(A a)Invoke this function with the given argument, potentially throwing anyThrowable.static <A> Id<A>id()static <A> Aid(A a)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Field Detail
-
INSTANCE
private static final Id<?> INSTANCE
-
-
Method Detail
-
checkedApply
public A checkedApply(A a)
Description copied from interface:Fn1Invoke this function with the given argument, potentially throwing anyThrowable.- Specified by:
checkedApplyin interfaceFn1<A,A>- Parameters:
a- the argument- Returns:
- the result of the function application
-
id
public static <A> Id<A> id()
-
id
public static <A> A id(A a)
-
-