commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (COLLECTIONS-670) Add org.apache.commons.collections4.IteratorUtils.first(Iterator<E>)
Date Wed, 10 Jan 2018 16:48:00 GMT

     [ https://issues.apache.org/jira/browse/COLLECTIONS-670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Gregory updated COLLECTIONS-670:
-------------------------------------
    Description: 
Add org.apache.commons.collections4.IteratorUtils.first(Iterator<E>):
{code:java}
    /**
     * Returns the <code>first</code> value in {@link Iterator}, throwing
     * <code>IndexOutOfBoundsException</code> if there is no such element.
     * <p>
     * The Iterator is advanced to <code>index</code> (or to the end, if
     * <code>index</code> exceeds the number of entries) as a side effect of this
method.
     *
     * @param <E> the type of object in the {@link Iterator}
     * @param iterator  the iterator to get a value from
     * @return the first object
     * @throws IndexOutOfBoundsException if the request is invalid
     * @since 4.2
     */
     public static <E> E first(Iterator<E> iterator)
{code}

  was:
Add org.apache.commons.collections4.IteratorUtils.first(Iterator<E>):
{code:java}
    /**
     * Returns the <code>first</code> value in {@link Iterator}, throwing
     * <code>IndexOutOfBoundsException</code> if there is no such element.
     * <p>
     * The Iterator is advanced to <code>index</code> (or to the end, if
     * <code>index</code> exceeds the number of entries) as a side effect of this
method.
     *
     * @param <E> the type of object in the {@link Iterator}
     * @param iterator  the iterator to get a value from
     * @return the first object
     * @throws IndexOutOfBoundsException if the request is invalid
     * @since 4.2
     */
{code}


> Add org.apache.commons.collections4.IteratorUtils.first(Iterator<E>)
> --------------------------------------------------------------------
>
>                 Key: COLLECTIONS-670
>                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-670
>             Project: Commons Collections
>          Issue Type: New Feature
>          Components: Iterator
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>
> Add org.apache.commons.collections4.IteratorUtils.first(Iterator<E>):
> {code:java}
>     /**
>      * Returns the <code>first</code> value in {@link Iterator}, throwing
>      * <code>IndexOutOfBoundsException</code> if there is no such element.
>      * <p>
>      * The Iterator is advanced to <code>index</code> (or to the end, if
>      * <code>index</code> exceeds the number of entries) as a side effect
of this method.
>      *
>      * @param <E> the type of object in the {@link Iterator}
>      * @param iterator  the iterator to get a value from
>      * @return the first object
>      * @throws IndexOutOfBoundsException if the request is invalid
>      * @since 4.2
>      */
>      public static <E> E first(Iterator<E> iterator)
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message