--- old/src/share/classes/java/util/function/IntBinaryOperator.java 2012-12-05 09:51:11.274804628 -0800
+++ new/src/share/classes/java/util/function/IntBinaryOperator.java 2012-12-05 09:51:11.066804618 -0800
@@ -27,9 +27,27 @@
/**
* An operation on two {@code int} operands yielding an {@code int} result.
*
+ *
This is the primitive type specialization of {@link BinaryOperator} for
+ * {@code int} 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 IntBinaryOperator {
+public interface IntBinaryOperator 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 Integer operate(Integer left, Integer right) {
+ return operateAsInt((int)left, (int)right);
+ }
/**
* Returns the {@code int} result of the operation upon the {@code int}