Interface FallibleIntSupplier<X extends Throwable>

Type Parameters:
X - the type of the exception potentially being thrown
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 interface FallibleIntSupplier<X extends Throwable>
An alternative to the IntSupplier interface that allows the functional method to throw a checked exception.
Author:
Ayco Holleman
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Gets a result.
  • Method Details

    • getAsInt

      int getAsInt() throws X
      Gets a result.
      Returns:
      a result
      Throws:
      X - if the operation fails