jdk/src/share/classes/java/util/function/UnaryOperator.java
changeset 16011 890a7ed97f6c
parent 15647 314007859004
child 17695 032254f2467b
--- a/jdk/src/share/classes/java/util/function/UnaryOperator.java	Tue Feb 19 10:34:26 2013 -0800
+++ b/jdk/src/share/classes/java/util/function/UnaryOperator.java	Tue Feb 19 11:56:49 2013 -0800
@@ -26,20 +26,14 @@
 
 /**
  * An operation upon a single operand yielding a result. The operand and the
- * result are of the same type.
+ * result are of the same type. This is a specialization of {@code Function} for
+ * the case where the operand and result are of the same type.
  *
- * @param <T> the type of operand to {@code operate} and of the result
+ * @param <T> the type of operand to {@code apply} and of the result
  *
+ * @see Function
  * @since 1.8
  */
 @FunctionalInterface
-public interface UnaryOperator<T> {
-
-    /**
-     * Returns the result of the operation upon the operand.
-     *
-     * @param operand the operand
-     * @return the operation result
-     */
-    public T operate(T operand);
+public interface UnaryOperator<T> extends Function<T, T> {
 }