--- old/src/share/classes/java/util/function/DoubleBinaryOperator.java 2012-12-05 09:51:07.914804466 -0800
+++ new/src/share/classes/java/util/function/DoubleBinaryOperator.java 2012-12-05 09:51:07.706804456 -0800
@@ -27,12 +27,27 @@
/**
* An operation on two {@code double} operands yielding a {@code double} result.
*
+ *
This is the primitive type specialization of {@link BinaryOperator} for
+ * {@code double} and also may be used as a {@code BinaryOperator}. When
+ * used as a {@code BinaryOperator} the default {@code operate} implementation
+ * provided by this interface neither accepts null parameters nor does it return
+ * null results.
+ *
* @since 1.8
*/
-public interface DoubleBinaryOperator /* extends BinaryOperator */ {
-//
-// @Override
-// public default Double operate(Double left, Double right) { return operateAsDouble((double) left, (double) right); }
+public interface DoubleBinaryOperator extends BinaryOperator {
+
+ /**
+ * {@inheritDoc}
+ *
+ * @param left {@inheritDoc}, must be non-null
+ * @param right {@inheritDoc}, must be non-null
+ * @return {@inheritDoc}, always non-null
+ */
+ @Override
+ public default Double operate(Double left, Double right) {
+ return operateAsDouble((double)left, (double)right);
+ }
/**
* Returns the {@code double} result of the operation upon the
@@ -40,7 +55,7 @@
* {@code right} for operations where the order of parameters matters.
*
* @param left the left operand value
- * @param right the right operand value
+ * @param right the right operand value
* @return the result of the operation
*/
public double operateAsDouble(double left, double right);