src/share/classes/java/util/function/IntUnaryOperator.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

*** 27,37 **** /** * An operation on a single {@code int} operand yielding an {@code int} result. * * @since 1.8 */ ! public interface IntUnaryOperator { /** * Returns the {@code int} result of the operation upon the {@code int} * operand. * --- 27,42 ---- /** * An operation on a single {@code int} operand yielding an {@code int} result. * * @since 1.8 */ ! public interface IntUnaryOperator extends UnaryOperator<Integer> { ! ! @Override ! public default Integer operate(Integer operand) { ! return operateAsInt((int) operand); ! } /** * Returns the {@code int} result of the operation upon the {@code int} * operand. *