Interface Checked.ShortSupplier<E extends Throwable>

  • Type Parameters:
    E - Exception type that can be thrown by the body.
    All Superinterfaces:
    Checked<Checked.ShortSupplier<E>,​E>
    Enclosing interface:
    Checked<WT,​EX extends Throwable>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface Checked.ShortSupplier<E extends Throwable>
    A supplier of short-valued results, with a body that can throw checked exceptions.
    • Method Detail

      • getAsShort

        short getAsShort()
                  throws E extends Throwable
        Get the supplied value.
        Throws:
        E extends Throwable
      • use

        static <E extends ThrowableChecked.ShortSupplier<E> use​(Checked.ShortSupplier<E> o)
        Shapes a lambda or method reference into an instance of this functional interface.

        This is simply an identity function that can take the place of a more unwieldy cast.

        Type Parameters:
        E - Least upper bound of exception types o can throw.
        Parameters:
        o - The implementing lambda or method reference.