Interface ObjIntFunction<T,​R>

  • Type Parameters:
    T - the type of the object parameter
    R - the type of the result
    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 ObjIntFunction<T,​R>
    A function of two arguments - one object and one int.

    This takes two arguments and returns an object result.

    See Also:
    BiFunction
    • Method Detail

      • apply

        R apply​(T obj,
                int value)
        Applies the function.
        Parameters:
        obj - the first argument
        value - the second argument
        Returns:
        the result of the function
      • andThen

        default <V> ObjIntFunction<T,​V> andThen​(Function<? super R,​? extends V> other)
        Returns a new function that composes this function and the specified function.

        This returns a composed function that applies the input to this function and then converts the result using the specified function.

        Type Parameters:
        V - the result type of second function
        Parameters:
        other - the second function
        Returns:
        the combined function, "this AND_THEN that"
        Throws:
        NullPointerException - if the other function is null