Lines Matching full:code
45 * of type {@code Iterable}. Except as noted, each method has a corresponding
56 /** Returns an unmodifiable view of {@code iterable}. */
72 * Returns the number of elements in {@code iterable}.
81 * Returns {@code true} if {@code iterable} contains {@code element}; that is,
82 * any object for while {@code equals(element)} is true.
103 * <p>This method calls {@link Collection#removeAll} if {@code iterable} is a
108 * @return {@code true} if any elements are removed from {@code iterable}
121 * <p>This method calls {@link Collection#retainAll} if {@code iterable} is a
126 * @return {@code true} if any elements are removed from {@code iterable}
142 * @return {@code true} if any elements were removed from the iterable
145 * {@code remove()}.
186 * More specifically, this method returns {@code true} if {@code iterable1}
187 * and {@code iterable2} contain the same number of elements and every element
188 * of {@code iterable1} is equal to the corresponding element of
189 * {@code iterable2}.
197 * Returns a string representation of {@code iterable}, with the format
198 * {@code [e1, e2, ..., en]}.
205 * Returns the single element contained in {@code iterable}.
216 * Returns the single element contained in {@code iterable}, or {@code
246 * Adds all elements in {@code iterable} to {@code collection}.
248 * @return {@code true} if {@code collection} was modified as a result of this
279 * {@code iterable}.
281 * <p>That iterator supports {@code remove()} if {@code iterable.iterator()}
282 * does. After {@code remove()} is called, subsequent cycles omit the removed
283 * element, which is no longer in {@code iterable}. The iterator's
284 * {@code hasNext()} method returns {@code true} until {@code iterable} is
288 * infinite loop. You should use an explicit {@code break} or be certain that
291 * <p>To cycle over the iterable {@code n} times, use the following:
292 * {@code Iterables.concat(Collections.nCopies(n, iterable))}
310 * <p>After {@code remove} is invoked on a generated iterator, the removed
313 * as {@code Iterables.cycle(Lists.newArrayList(elements))}. The iterator's
314 * {@code hasNext} method returns {@code true} until all of the original
318 * infinite loop. You should use an explicit {@code break} or be certain that
321 * <p>To cycle over the elements {@code n} times, use the following:
322 * {@code Iterables.concat(Collections.nCopies(n, Arrays.asList(elements)))}
330 * iterator that traverses the elements in {@code a}, followed by the elements
331 * in {@code b}. The source iterators are not polled until necessary.
333 * <p>The returned iterable's iterator supports {@code remove()} when the
346 * an iterator that traverses the elements in {@code a}, followed by the
347 * elements in {@code b}, followed by the elements in {@code c}. The source
350 * <p>The returned iterable's iterator supports {@code remove()} when the
364 * an iterator that traverses the elements in {@code a}, followed by the
365 * elements in {@code b}, followed by the elements in {@code c}, followed by
366 * the elements in {@code d}. The source iterators are not polled until
369 * <p>The returned iterable's iterator supports {@code remove()} when the
386 * {@code inputs}. The input iterators are not polled until necessary.
388 * <p>The returned iterable's iterator supports {@code remove()} when the
400 * {@code inputs}. The input iterators are not polled until necessary.
402 * <p>The returned iterable's iterator supports {@code remove()} when the
404 * iterable may throw {@code NullPointerException} if any of the input
440 * {@code [a, b, c, d, e]} with a partition size of 3 yields {@code
448 * <p><b>Note:</b> if {@code
453 * @return an iterable of unmodifiable lists containing the elements of {@code
455 * @throws IllegalArgumentException if {@code size} is nonpositive
471 * an iterable containing {@code [a, b, c, d, e]} with a partition size of 3
472 * yields {@code [[a, b, c], [d, e, null]]} -- an outer iterable containing
480 * @return an iterable of unmodifiable lists containing the elements of {@code
483 * @throws IllegalArgumentException if {@code size} is nonpositive
497 * Returns the elements of {@code unfiltered} that satisfy a predicate. The
498 * resulting iterable's iterator does not support {@code remove()}.
512 * Returns all instances of class {@code type} in {@code unfiltered}. The
513 * returned iterable has elements whose class is {@code type} or a subclass of
514 * {@code type}. The returned iterable's iterator does not support
515 * {@code remove()}.
535 * Returns {@code true} if one or more elements in {@code iterable} satisfy
544 * Returns {@code true} if every element in {@code iterable} satisfies the
545 * predicate. If {@code iterable} is empty, {@code true} is returned.
553 * Returns the first element in {@code iterable} that satisfies the given
556 * @throws NoSuchElementException if no element in {@code iterable} matches
565 * Returns the index in {@code iterable} of the first element that satisfies
566 * the provided {@code predicate}, or {@code -1} if the Iterable has no such
569 * <p>More formally, returns the lowest index {@code i} such that
570 * {@code predicate.apply(Iterables.get(iterable, i))} is {@code true} or
571 * {@code -1} if there is no such index.
581 * Returns an iterable that applies {@code function} to each element of {@code
584 * <p>The returned iterable's iterator supports {@code remove()} if the
585 * provided iterator does. After a successful {@code remove()} call,
586 * {@code fromIterable} no longer contains the corresponding element.
603 * @return the element at the specified position in {@code iterable}
604 * @throws IndexOutOfBoundsException if {@code position} is negative or
605 * greater than or equal to the size of {@code iterable}
628 * Returns the last element of {@code iterable}.
630 * @return the last element of {@code iterable}
676 * especially useful in foreach-style loops: <pre class="code"> {@code
716 * @return {@code true} if the iterable contains no elements
728 * by the iterator in turn to see if it equals the object {@code o}. If they
730 * {@code remove} method. At most one element is removed, even if the iterable
731 * contains multiple members that equal {@code o}.
734 * {@link HashSet}, that has a fast {@code remove} method.
738 * @return {@code true} if the iterable changed as a result
740 * {@code remove} method and the iterable contains the object