diff -r 18aee3cc498f -r 7b25fde2a4ed jdk/src/share/classes/java/util/function/IntUnaryOperator.java --- a/jdk/src/share/classes/java/util/function/IntUnaryOperator.java Mon Jul 22 12:59:09 2013 -0700 +++ b/jdk/src/share/classes/java/util/function/IntUnaryOperator.java Tue Jul 23 13:20:11 2013 -0700 @@ -27,9 +27,12 @@ import java.util.Objects; /** - * An operation on a single {@code int} operand yielding an {@code int} result. - * This is the primitive type specialization of {@link UnaryOperator} for - * {@code int}. + * Represents an operation on a single {@code int}-valued operand that produces + * an {@code int}-valued result. This is the primitive type specialization of + * {@link UnaryOperator} for {@code int}. + * + *

This is a functional interface + * whose functional method is {@link #applyAsInt(int)}. * * @see UnaryOperator * @since 1.8 @@ -38,24 +41,25 @@ public interface IntUnaryOperator { /** - * Returns the {@code int} value result of the operation upon the - * {@code int} operand. + * Applies this operator to the given operand. * - * @param operand the operand value - * @return the operation result value + * @param operand the operand + * @return the operator result */ int applyAsInt(int operand); /** - * Compose a new function which applies the provided function followed by - * this function. If either function throws an exception, it is relayed - * to the caller. + * Returns a composed operator that first applies the {@code before} + * operator to its input, and then applies this operator to the result. + * If evaluation of either operator throws an exception, it is relayed to + * the caller of the composed operator. * - * @param before an additional function to be applied before this function - * is applied - * @return a function which performs the provided function followed by this - * function + * @param before the operator to apply before this operator is applied + * @return a composed operator that first applies the {@code before} + * operator and then applies this operator * @throws NullPointerException if before is null + * + * @see #andThen(IntUnaryOperator) */ default IntUnaryOperator compose(IntUnaryOperator before) { Objects.requireNonNull(before); @@ -63,15 +67,17 @@ } /** - * Compose a new function which applies this function followed by the - * provided function. If either function throws an exception, it is relayed - * to the caller. + * Returns a composed operator that first applies this operator to + * its input, and then applies the {@code after} operator to the result. + * If evaluation of either operator throws an exception, it is relayed to + * the caller of the composed operator. * - * @param after an additional function to be applied after this function is - * applied - * @return a function which performs this function followed by the provided - * function followed + * @param after the operator to apply after this operator is applied + * @return a composed operator that first applies this operator and then + * applies the {@code after} operator * @throws NullPointerException if after is null + * + * @see #compose(IntUnaryOperator) */ default IntUnaryOperator andThen(IntUnaryOperator after) { Objects.requireNonNull(after); @@ -79,9 +85,9 @@ } /** - * Returns a unary operator that provides its input value as the result. + * Returns a unary operator that always returns its input argument. * - * @return a unary operator that provides its input value as the result + * @return a unary operator that always returns its input argument */ static IntUnaryOperator identity() { return t -> t;