commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1479682 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
Date Mon, 06 May 2013 21:53:50 GMT
On 6 May 2013 20:12,  <tn@apache.org> wrote:
> Author: tn
> Date: Mon May  6 19:12:25 2013
> New Revision: 1479682
>
> URL: http://svn.apache.org/r1479682
> Log:
> Add again chainedIterator method with 2 iterators to avoid generics warning in client
code.

Please document this in the code, not just SVN log.

> Modified:
>     commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
>
> Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
> URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java?rev=1479682&r1=1479681&r2=1479682&view=diff
> ==============================================================================
> --- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
(original)
> +++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/IteratorUtils.java
Mon May  6 19:12:25 2013
> @@ -471,6 +471,22 @@ public class IteratorUtils {
>
>      // Chained
>      //-----------------------------------------------------------------------
> +
> +    /**
> +     * Gets an iterator that iterates through two {@link Iterator}s
> +     * one after another.
> +     *
> +     * @param <E>  the element type
> +     * @param iterator1  the first iterator to use, not null
> +     * @param iterator2  the second iterator to use, not null
> +     * @return a combination iterator over the iterators
> +     * @throws NullPointerException if either iterator is null
> +     */
> +    public static <E> Iterator<E> chainedIterator(final Iterator<? extends
E> iterator1,
> +                                                  final Iterator<? extends E>
iterator2) {
> +        return new IteratorChain<E>(iterator1, iterator2);
> +    }
> +
>      /**
>       * Gets an iterator that iterates through an array of {@link Iterator}s
>       * one after another.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message