Class Downcast<A extends B,B>
java.lang.Object
com.jnape.palatable.lambda.functions.builtin.fn1.Downcast<A,B>
- Type Parameters:
A
- the subtypeB
- the supertype
- All Implemented Interfaces:
Fn1<B,
,A> Applicative<A,
,Fn1<B, ?>> Cartesian<B,
,A, Fn1<?, ?>> Cocartesian<B,
,A, Fn1<?, ?>> Contravariant<B,
,Profunctor<?, A, Fn1<?, ?>>> Functor<A,
,Fn1<B, ?>> Profunctor<B,
,A, Fn1<?, ?>> Monad<A,
,Fn1<B, ?>> MonadReader<B,
,A, Fn1<B, ?>> MonadRec<A,
,Fn1<B, ?>> MonadWriter<B,
A, Fn1<B, ?>>
Covariantly cast a value of type
B
to a value of subtype A
. Unsafe.-
Field Details
-
INSTANCE
-
-
Constructor Details
-
Downcast
private Downcast()
-
-
Method Details
-
checkedApply
Description copied from interface:Fn1
Invoke this function with the given argument, potentially throwing anyThrowable
.- Specified by:
checkedApply
in interfaceFn1<A extends B,
B> - Parameters:
b
- the argument- Returns:
- the result of the function application
-
downcast
-
downcast
public static <A extends B,B> A downcast(B b)
-