Interface IntFloatFunction<R>

  • Type Parameters:
    R - The type of the function-output.
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    public interface IntFloatFunction<R>
    Function-Pointer Input: int, float Output: R.

    This is a function having an 'apply(...)' method which accepts two primitives-type parameters as follows type:

    1. 'int'
    2. 'float'

    The output of apply(...) follows the standard rules of Java's functional interfaces, and may be specified using the generic-type parameter 'R'.

    • Method Summary

      @FunctionalInterface (Lambda) Method
      Modifier and Type Method
      R apply​(int i, float f)
      Default Composition & Builder Method(s)
      Modifier and Type Method
      default <V> IntFloatFunction<V> andThen​(Function<R,​V> after)
    • Method Detail

      • apply

        R apply​(int i,
                float f)
        Applies this function to the given arguments.
        i - The integer (first) argument to the function.
        f - The floating-point (second) argument to the function.
        The function result. Result shall be of type 'R'
      • andThen

        default <V> IntFloatFunction<V> andThen​
                    (java.util.function.Function<R,​V> after)
        Returns a composed function that first applies 'this' function to its input, and then applies the 'after' function to the result. If evaluation of either function throws an exception, it is relayed to the caller of the composed function.
        Type Parameters:
        V - The output-type of the 'after' function, and also of the (returned) 'composed' function.
        after - The function to apply, after this function is applied.
        java.lang.NullPointerException - This throws if null is passed to 'after'.
        Exact Method Body:
         if (after == null) throw new NullPointerException
             ("null has been passed to parameter 'after'");
         return (int i, float f) -> after.apply(this.apply(i, f));