OpenJDK / lambda / lambda / jdk
changeset 7812:026f882400f9
javadoc corrections and improvements
author | mduigou |
---|---|
date | Wed, 03 Apr 2013 11:55:23 -0700 |
parents | e74b9d1d2785 |
children | 65f0db78e145 |
files | src/share/classes/java/util/function/Functions.java src/share/classes/java/util/function/IntUnaryOperator.java |
diffstat | 2 files changed, 9 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/java/util/function/Functions.java Thu Apr 04 10:16:22 2013 -0700 +++ b/src/share/classes/java/util/function/Functions.java Wed Apr 03 11:55:23 2013 -0700 @@ -77,16 +77,14 @@ /** * Returns a function which maps inputs according to the provided mapping. - * Attempting to apply a value not from the given map will cause an + * Attempting to map a value not from the given map will cause an * {@code IllegalArgumentException} to be thrown. A copy is * <strong>not</strong> made of the map. Care should be taken to avoid * changes to the map during use of the function. * - * @param <R> output type from mapping operation - * @param <T> input type to mapping operation - * @param map provides the mappings from {@code <T>} to {@code <U>} - * @throws IllegalArgumentException for all values of {@code <T>} not - * present in the map + * @param <T> input type to mapping function + * @param <R> output type from mapping function + * @param map provides mappings from {@code <T>} to {@code <R>} * @throws NullPointerException if map is null */ public static <R, T> Function<T, R> forMap(Map<? super T, ? extends R> map) { @@ -105,12 +103,13 @@ /** * Returns a function which maps inputs according to the provided mapping. * The provided default value is returned for all {@code <T>} keys not found - * in the map. A copy is <strong>not</strong> made of the map. + * in the map. A copy is <strong>not</strong> made of the map. Care should + * be taken to avoid changes to the map during use of the function. * * @param <T> input type to mapping function * @param <R> output type from mapping function - * @param <RR> output type from mapping function - * @param mapping provides the mappings from {@code <T>} to {@code <U>} + * @param <RR> type of values in the map + * @param map provides mappings from {@code <T>} to {@code <R>} * @param defaultValue the value returned by {@code apply} method for * {@code <T>} values not contained in the provided map. * @throws NullPointerException if map is null
--- a/src/share/classes/java/util/function/IntUnaryOperator.java Thu Apr 04 10:16:22 2013 -0700 +++ b/src/share/classes/java/util/function/IntUnaryOperator.java Wed Apr 03 11:55:23 2013 -0700 @@ -37,7 +37,7 @@ /** * Returns the {@code int} value result of the operation upon the - * {@code int} operand. + * {@code int} operand. * * @param operand the operand value * @return the operation result value