From commits-return-60845-archive-asf-public=cust-asf.ponee.io@commons.apache.org Fri Jan 12 19:03:48 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id D4227180621 for ; Fri, 12 Jan 2018 19:03:48 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id C483A160C33; Fri, 12 Jan 2018 18:03:48 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 12EB9160C20 for ; Fri, 12 Jan 2018 19:03:47 +0100 (CET) Received: (qmail 97574 invoked by uid 500); 12 Jan 2018 18:03:47 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 97565 invoked by uid 99); 12 Jan 2018 18:03:47 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2018 18:03:47 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id ECC90DFB31; Fri, 12 Jan 2018 18:03:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: ggregory@apache.org To: commits@commons.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: commons-collections git commit: Javadoc. Date: Fri, 12 Jan 2018 18:03:46 +0000 (UTC) Repository: commons-collections Updated Branches: refs/heads/master 22daa5f1d -> 1e6435ec1 Javadoc. Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/1e6435ec Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/1e6435ec Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/1e6435ec Branch: refs/heads/master Commit: 1e6435ec103c1d52b119602a3aa48bfa5775d01d Parents: 22daa5f Author: Gary Gregory Authored: Fri Jan 12 11:03:43 2018 -0700 Committer: Gary Gregory Committed: Fri Jan 12 11:03:43 2018 -0700 ---------------------------------------------------------------------- .../org/apache/commons/collections4/IterableUtils.java | 4 ++++ .../org/apache/commons/collections4/IteratorUtils.java | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-collections/blob/1e6435ec/src/main/java/org/apache/commons/collections4/IterableUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java index d5cb444..104f4d1 100644 --- a/src/main/java/org/apache/commons/collections4/IterableUtils.java +++ b/src/main/java/org/apache/commons/collections4/IterableUtils.java @@ -775,10 +775,14 @@ public class IterableUtils { } /** + * Shortcut for {@code get(iterator, 0)}. + *

* Returns the first value in the iterable's {@link Iterator}, throwing * IndexOutOfBoundsException if there is no such element. + *

*

* If the {@link Iterable} is a {@link List}, then it will use {@link List#get(int)}. + *

* * @param the type of object in the {@link Iterable}. * @param iterable the {@link Iterable} to get a value from, may be null http://git-wip-us.apache.org/repos/asf/commons-collections/blob/1e6435ec/src/main/java/org/apache/commons/collections4/IteratorUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/collections4/IteratorUtils.java b/src/main/java/org/apache/commons/collections4/IteratorUtils.java index 86a2c09..79ce159 100644 --- a/src/main/java/org/apache/commons/collections4/IteratorUtils.java +++ b/src/main/java/org/apache/commons/collections4/IteratorUtils.java @@ -1413,14 +1413,17 @@ public class IteratorUtils { } /** + * Shortcut for {@code get(iterator, 0)}. + *

* Returns the first value in {@link Iterator}, throwing * IndexOutOfBoundsException if there is no such element. + *

*

- * The Iterator is advanced to index (or to the end, if - * index exceeds the number of entries) as a side effect of this method. - * + * The Iterator is advanced to 0 (or to the end, if + * 0 exceeds the number of entries) as a side effect of this method. + *

* @param the type of object in the {@link Iterator} - * @param iterator the iterator to get a value from + * @param iterator the iterator to get a value from * @return the first object * @throws IndexOutOfBoundsException if the request is invalid * @since 4.2