com.jnape.palatable.lambda.functions.builtin.fn1

## Class Downcast<A extends B,B>

- java.lang.Object
- - com.jnape.palatable.lambda.functions.builtin.fn1.Downcast<A,B>

- Type Parameters:
    `A` - the subtype
    `B` - 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,?>>

      public final class Downcast<A extends B,B>
      extends Object
      implements Fn1<B,A>

  Covariantly cast a value of type `B` to a value of subtype `A`. Unsafe.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    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<A,B>` | `downcast()`
    `static <A extends B,B> A` | `downcast(B b)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1

      `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`

    - ### Methods inherited from interface com.jnape.palatable.lambda.monad.Monad

      `join`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functor.Functor

      `coerce`

- - ### Method Detail

    - #### checkedApply

          public A checkedApply(B b)

      Description copied from interface: `Fn1`
      Invoke this function with the given argument, potentially throwing any `Throwable`.
      Specified by:
        `checkedApply` in interface `Fn1<B,A extends B>`
      Parameters:
        `b` - the argument
      Returns:
        the result of the function application

    - #### downcast

          public static <A extends B,B> Downcast<A,B> downcast()

    - #### downcast

          public static <A extends B,B> A downcast(B b)