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

*** 28,38 **** * An operation on a single {@code double} operand yielding a {@code double} * result. * * @since 1.8 */ ! public interface DoubleUnaryOperator { /** * Returns the {@code double} result of the operation upon the * {@code double} operand. * --- 28,41 ---- * An operation on a single {@code double} operand yielding a {@code double} * result. * * @since 1.8 */ ! public interface DoubleUnaryOperator extends UnaryOperator<Double> { ! ! @Override ! public default Double operate(Double operand) { return operateAsDouble((double) operand); } /** * Returns the {@code double} result of the operation upon the * {@code double} operand. *