src/share/classes/java/util/function/IntFunction.java

Print this page
rev 6137 : 8004015: Add Extends and deaults for basic functional interface types
Summary: Adds the appropriate extends and default methods for  core functional interfaces used by the JSR335 libraries.
Reviewed-by: duke

*** 30,40 **** * * @param <T> the type of input objects to the function * * @since 1.8 */ ! public interface IntFunction<T> { /** * Apply a function to the input object yielding an appropriate {@code int} * value. * --- 30,43 ---- * * @param <T> the type of input objects to the function * * @since 1.8 */ ! public interface IntFunction<T> extends Function<T,Integer> { ! ! @Override ! public default Integer apply(T t) { return applyAsInt(t); } /** * Apply a function to the input object yielding an appropriate {@code int} * value. *