changeset 8107:848d4f50e1c9

correct host class for identity utility. It will be moved to Function when missing compiler and runtime support is available.
author mduigou
date Fri, 12 Apr 2013 17:47:51 -0700
parents 0370460141c4
children dffa8d964b0f
files src/share/classes/java/util/stream/Collectors.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/stream/Collectors.java	Fri Apr 12 17:32:07 2013 -0700
+++ b/src/share/classes/java/util/stream/Collectors.java	Fri Apr 12 17:47:51 2013 -0700
@@ -766,12 +766,12 @@
      *
      * @apiNote
      * It is common for either the key or the value to be the input elements.
-     * In this case, the utility method {@link Function#identity()} is likely
+     * In this case, the utility method {@link Functions#identity()} is likely
      * to be helpful.  For example, the following produces a {@code Map} mapping
      * students to their grade point average:
      * <pre>{@code
      *     Map<Student, Double> studentToGPA
-     *         students.stream().collect(toMap(Function.identity(),
+     *         students.stream().collect(toMap(Functions.identity(),
      *                                         student -> computeGPA(student)));
      * }</pre>
      * And the following produces a {@code Map} mapping a unique identifier to
@@ -779,7 +779,7 @@
      * <pre>{@code
      *     Map<String, Student> studentIdToStudent
      *         students.stream().collect(toMap(Student::getId,
-     *                                         Function.identity());
+     *                                         Functions.identity());
      * }</pre>
      * @param <T> The type of the input elements
      * @param <K> The output type of the key mapping function