From 9d13951390ca454cde3c972344c195d1000d706a Mon Sep 17 00:00:00 2001
From: Gary Gregory
* The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. + *
* * @param* The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. + *
* * @param* The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. + *
* * @param* The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. + *
* * @param* The returned iterable's iterator supports {@code remove()} when the * corresponding input iterator supports it. + *
* * @param* The returned iterable's iterator supports {@code remove()} when the * corresponding input iterator supports it. + *
* * @param* A {@code null} or empty iterable returns false. + *
* * @param* A {@code null} iterable matches no elements. + *
* * @param* This iterable does not contain any elements. + *
* * @param* The returned iterable's iterator supports {@code remove()} when the * corresponding input iterator supports it. + *
* * @param* A {@code null} or empty iterator returns null. + *
* * @param* If the input iterable is null no change is made. + *
* * @param* If the {@link Iterable} is a {@link List}, then it will use {@link List#get(int)}. + *
* * @param* A {@code null} or empty iterable returns -1. + *
* * @param* A {@code null} iterable returns true. + *
* * @param iterable the {@link Iterable to use}, may be null * @return true if the iterable is null or empty, false otherwise @@ -543,6 +564,7 @@ public static boolean isEmpty(final Iterable> iterable) { * cycles omit the removed element, which is no longer in {@code iterable}. The * iterator's {@code hasNext()} method returns {@code true} until {@code iterable} * is empty. + * * * @param* A {@code null} or empty iterable returns true. + *
* * @param* A {@code null} or empty iterable returns false. + *
* * @param* [C1, C2, R] = partition(I, P1, P2) with * I = input @@ -617,14 +642,17 @@ public staticboolean matchesAny(final Iterable iterable, final Predicate * * Note: elements are only added to the output collection of the first matching * predicate, determined by the order of arguments. + *
** If the input iterable is {@code null}, the same is returned as for an * empty iterable. * If no predicates have been provided, all elements of the input collection * will be added to the rejected collection. + *
** Example: for an input list [1, 2, 3, 4, 5] calling partition with predicates [x < 3] * and [x < 5] will result in the following output: [[1, 2], [3, 4], [5]]. + *
* * @paramthe type of object the {@link Iterable} contains * @param the type of the output {@link Collection} @@ -694,6 +722,7 @@ public static > List partition(final Iterable ex * For each predicate, the result will contain a list holding all elements of the * input iterable matching the predicate. The last list will hold all elements * which didn't match any predicate: + * * * [C1, R] = partition(I, P1) with * I = input @@ -704,9 +733,11 @@ public static> List partition(final Iterable ex * * If the input iterable is {@code null}, the same is returned as for an * empty iterable. + *
** Example: for an input list [1, 2, 3, 4, 5] calling partition with a predicate [x < 3] * will result in the following output: [[1, 2], [3, 4, 5]]. + *
* * @paramthe type of object the {@link Iterable} contains * @param iterable the iterable to partition, may be null @@ -731,6 +762,7 @@ public static List > partition(final Iterable extends O> iterable, * For each predicate, the result will contain a list holding all elements of the * input iterable matching the predicate. The last list will hold all elements * which didn't match any predicate: + * *
* [C1, C2, R] = partition(I, P1, P2) with * I = input @@ -743,12 +775,15 @@ public staticList > partition(final Iterable extends O> iterable, *
* Note: elements are only added to the output collection of the first matching * predicate, determined by the order of arguments. + *
** If the input iterable is {@code null}, the same is returned as for an * empty iterable. + *
** Example: for an input list [1, 2, 3, 4, 5] calling partition with predicates [x < 3] * and [x < 5] will result in the following output: [[1, 2], [3, 4], [5]]. + *
* * @paramthe type of object the {@link Iterable} contains * @param iterable the collection to get the input from, may be null @@ -770,9 +805,11 @@ public static List > partition(final Iterable extends O> iterable, * In case the provided iterable is a {@link List} instance, a * {@link ReverseListIterator} will be used to reverse the traversal * order, otherwise an intermediate {@link List} needs to be created. + * *
* The returned iterable's iterator supports {@code remove()} if the * provided iterable is a {@link List} instance. + *
* * @paramthe element type * @param iterable the iterable to use, may not be null @@ -797,6 +834,7 @@ public Iterator iterator() { * Returns the number of elements contained in the given iterator. * * A {@code null} or empty iterator returns {@code 0}. + *
* * @param iterable the iterable to check, may be null * @return the number of elements contained in the iterable @@ -816,6 +854,7 @@ public static int size(final Iterable> iterable) { ** The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. + *
* * @paramthe element type * @param iterable the iterable to use, may not be null @@ -856,6 +895,7 @@ public static List toList(final Iterable iterable) { * enclosed in square brackets ({@code "[]"}). Adjacent elements are separated * by the characters {@code ", "} (a comma followed by a space). Elements are * converted to strings as by {@code String.valueOf(Object)}. + * * * @param the element type * @param iterable the iterable to convert to a string, may be null @@ -872,6 +912,7 @@ public static String toString(final Iterable iterable) { * enclosed in square brackets ({@code "[]"}). Adjacent elements are separated * by the characters {@code ", "} (a comma followed by a space). Elements are * converted to strings as by using the provided {@code transformer}. + * * * @param the element type * @param iterable the iterable to convert to a string, may be null @@ -892,6 +933,7 @@ public static String toString(final Iterable iterable, * enclosed by the provided {@code prefix} and {@code suffix}. Adjacent elements * are separated by the provided {@code delimiter}. Elements are converted to * strings as by using the provided {@code transformer}. + * * * @param the element type * @param iterable the iterable to convert to a string, may be null @@ -917,6 +959,7 @@ public static String toString(final Iterable iterable, * * The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. + *
* * @param the input element type * @paramthe output element type @@ -943,6 +986,7 @@ public Iterator iterator() { * The returned iterable's iterator supports {@code remove()} when the * corresponding input iterator supports it. Calling {@code remove()} * will only remove a single element from the underlying iterator. + * * * @param the element type * @param iterable the iterable to use, may not be null @@ -963,6 +1007,7 @@ public Iterator iterator() { * Returns an unmodifiable view of the given iterable. * * The returned iterable's iterator does not support {@code remove()}. + *
* * @paramthe element type * @param iterable the iterable to use, may not be null @@ -983,9 +1028,11 @@ public static Iterable unmodifiableIterable(final Iterable iterable) { * The returned iterable has an iterator that traverses the elements in {@code a} * and {@code b} in alternating order. The source iterators are not polled until * necessary. + * * * The returned iterable's iterator supports {@code remove()} when the corresponding * input iterator supports it. + *
* * @paramthe element type * @param a the first iterable, may not be null