Interface IntFunction<T>

Type Parameters:
T - the returned value type
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 IntFunction<@NonNull T>
A functional interface (callback) that takes a primitive value and return value of type T.
  • Method Summary

    Modifier and Type
    Method
    Description
    apply(int i)
    Calculates a value based on a primitive integer input.
  • Method Details

    • apply

      T apply(int i) throws Throwable
      Calculates a value based on a primitive integer input.
      Parameters:
      i - the input value
      Returns:
      the result Object
      Throws:
      Throwable - if the implementation wishes to throw any type of exception