A
- the subtypeB
- the supertypepublic final class Downcast<A extends B,B> extends Object implements Fn1<B,A>
B
to a value of subtype A
. Unsafe.Modifier and Type | Method and Description |
---|---|
A |
checkedApply(B b)
Invoke this function with the given argument, potentially throwing any
Throwable . |
static <A extends B,B> |
downcast() |
static <A extends B,B> |
downcast(B b) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen, apply, carry, cartesian, censor, choose, cocartesian, compose, contraMap, diMap, diMapL, diMapR, discardL, discardR, flatMap, fmap, fn1, fromFunction, lazyZip, listens, local, pure, pureFn1, thunk, toFunction, trampolineM, widen, zip, zip
public A checkedApply(B b)
Fn1
Throwable
.checkedApply
in interface Fn1<B,A extends B>
b
- the argumentpublic static <A extends B,B> Downcast<A,B> downcast()
public static <A extends B,B> A downcast(B b)