Code review request to add @param <E> tags to various classes

Martin Buchholz martinrb at google.com
Wed Feb 24 04:53:44 UTC 2010


I agree that's it's a pretty good policy to have @params for all
type parameters.  Approved.

Martin

On Tue, Feb 23, 2010 at 19:37, Joe Darcy <Joe.Darcy at sun.com> wrote:
> Hello.
>
> Please review the patch below which adds missing "@param <E>" tags to
> document type variables in various types.
>
> -Joe
>
> --- old/src/share/classes/java/lang/Iterable.java    2010-02-23
> 19:00:32.000000000 -0800
> +++ new/src/share/classes/java/lang/Iterable.java    2010-02-23
> 19:00:31.000000000 -0800
> @@ -27,8 +27,12 @@
>
> import java.util.Iterator;
>
> -/** Implementing this interface allows an object to be the target of
> - *  the "foreach" statement.
> +/**
> + * Implementing this interface allows an object to be the target of
> + * the "foreach" statement.
> + *
> + * @param <T> the type of elements returned by the iterator
> + *
>  * @since 1.5
>  */
> public interface Iterable<T> {
> --- old/src/share/classes/java/util/Collection.java    2010-02-23
> 19:00:33.000000000 -0800
> +++ new/src/share/classes/java/util/Collection.java    2010-02-23
> 19:00:32.000000000 -0800
> @@ -103,6 +103,8 @@
>  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
>  * Java Collections Framework</a>.
>  *
> + * @param <E> the type of elements in this collection
> + *
>  * @author  Josh Bloch
>  * @author  Neal Gafter
>  * @see     Set
> --- old/src/share/classes/java/util/Iterator.java    2010-02-23
> 19:00:34.000000000 -0800
> +++ new/src/share/classes/java/util/Iterator.java    2010-02-23
> 19:00:33.000000000 -0800
> @@ -41,6 +41,8 @@
>  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
>  * Java Collections Framework</a>.
>  *
> + * @param <E> the type of elements returned by this iterator
> + *
>  * @author  Josh Bloch
>  * @see Collection
>  * @see ListIterator
> --- old/src/share/classes/java/util/List.java    2010-02-23
> 19:00:35.000000000 -0800
> +++ new/src/share/classes/java/util/List.java    2010-02-23
> 19:00:34.000000000 -0800
> @@ -89,6 +89,8 @@
>  * <a href="{@docRoot}/../technotes/guides/collections/index.html">
>  * Java Collections Framework</a>.
>  *
> + * @param <E> the type of elements in this list
> + *
>  * @author  Josh Bloch
>  * @author  Neal Gafter
>  * @see Collection
>
>



More information about the core-libs-dev mailing list