diff --git a/src/main/java/org/apache/commons/collections4/IterableUtils.java b/src/main/java/org/apache/commons/collections4/IterableUtils.java index d5cb44424..104f4d135 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
* 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.
+ *