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 Detail

      • apply

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