Java com.google.common.collect Iterables fields, constructors, methods, implement or subclass

Example usage for Java com.google.common.collect Iterables fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.google.common.collect Iterables.

The text is from its open source code.

Method

booleanaddAll(Collection addTo, Iterable elementsToAdd)
Adds all elements in iterable to collection .
booleanall(Iterable iterable, Predicate predicate)
Returns true if every element in iterable satisfies the predicate.
booleanany(Iterable iterable, Predicate predicate)
Returns true if any element in iterable satisfies the predicate.
Iterableconcat(Iterable a, Iterable b)
Combines two iterables into a single iterable.
Iterableconcat(Iterable a, Iterable b, Iterable c)
Combines three iterables into a single iterable.
Iterableconcat(Iterable... inputs)
Combines multiple iterables into a single iterable.
Iterableconcat(final Iterable> inputs)
Combines multiple iterables into a single iterable.
Iterableconcat(Iterable a, Iterable b, Iterable c, Iterable d)
Combines four iterables into a single iterable.
IterableconsumingIterable(final Iterable iterable)
Returns a view of the supplied iterable that wraps each generated Iterator through Iterators#consumingIterator(Iterator) .
booleancontains(Iterable iterable, @Nullable Object element)
Returns true if iterable contains any object for which equals(element) is true.
Iterablecycle(final Iterable iterable)
Returns an iterable whose iterators cycle indefinitely over the elements of iterable .
Iterablecycle(T... elements)
Returns an iterable whose iterators cycle indefinitely over the provided elements.
booleanelementsEqual(Iterable iterable1, Iterable iterable2)
Determines whether two iterables contain equal elements in the same order.
Iterablefilter(final Iterable unfiltered, final Predicate retainIfTrue)
Returns the elements of unfiltered that satisfy the input predicate retainIfTrue .
Iterablefilter(final Iterable unfiltered, final Class desiredType)
Returns all elements in unfiltered that are of the type desiredType .
Tfind(Iterable iterable, Predicate predicate)
Returns the first element in iterable that satisfies the given predicate; use this method only when such an element is known to exist.
Tfind(Iterable iterable, Predicate predicate, @Nullable T defaultValue)
Returns the first element in iterable that satisfies the given predicate, or defaultValue if none found.
intfrequency(Iterable iterable, @Nullable Object element)
Returns the number of elements in the specified iterable that equal the specified object.
Tget(Iterable iterable, int position)
Returns the element at the specified position in an iterable.
Tget(Iterable iterable, int position, @Nullable T defaultValue)
Returns the element at the specified position in an iterable or a default value otherwise.
TgetFirst(Iterable iterable, @Nullable T defaultValue)
Returns the first element in iterable or defaultValue if the iterable is empty.
TgetLast(Iterable iterable)
Returns the last element of iterable .
TgetLast(Iterable iterable, @Nullable T defaultValue)
Returns the last element of iterable or defaultValue if the iterable is empty.
TgetOnlyElement(Iterable iterable)
Returns the single element contained in iterable .
TgetOnlyElement(Iterable iterable, @Nullable T defaultValue)
Returns the single element contained in iterable , or defaultValue if the iterable is empty.
intindexOf(Iterable iterable, Predicate predicate)
Returns the index in iterable of the first element that satisfies the provided predicate , or -1 if the Iterable has no such elements.
booleanisEmpty(Iterable iterable)
Determines if the given iterable contains no elements.
Iterablelimit(final Iterable iterable, final int limitSize)
Creates an iterable with the first limitSize elements of the given iterable.
IterablemergeSorted(final Iterable> iterables, final Comparator comparator)
Returns an iterable over the merged contents of all given iterables .
Iterable>paddedPartition(final Iterable iterable, final int size)
Divides an iterable into unmodifiable sublists of the given size, padding the final iterable with null values if necessary.
Iterable>partition(final Iterable iterable, final int size)
Divides an iterable into unmodifiable sublists of the given size (the final iterable may be smaller).
booleanremoveAll(Iterable removeFrom, Collection elementsToRemove)
Removes, from an iterable, every element that belongs to the provided collection.
booleanremoveIf(Iterable removeFrom, Predicate predicate)
Removes, from an iterable, every element that satisfies the provided predicate.
booleanretainAll(Iterable removeFrom, Collection elementsToRetain)
Removes, from an iterable, every element that does not belong to the provided collection.
intsize(Iterable iterable)
Returns the number of elements in iterable .
Iterableskip(final Iterable iterable, final int numberToSkip)
Returns a view of iterable that skips its first numberToSkip elements.
T[]toArray(Iterable iterable, Class type)
Copies an iterable's elements into an array.
T[]toArray(Iterable iterable, T[] array)
StringtoString(Iterable iterable)
Returns a string representation of iterable , with the format [e1, e2, ..., en] (that is, identical to java.util.Arrays Arrays .toString(Iterables.toArray(iterable)) ).
Iterabletransform(final Iterable fromIterable, final Function function)
Returns an iterable that applies function to each element of fromIterable .
OptionaltryFind(Iterable iterable, Predicate predicate)
Returns an Optional containing the first element in iterable that satisfies the given predicate, if such an element exists.
IterableunmodifiableIterable(final Iterable iterable)
Returns an unmodifiable view of iterable .
IterableunmodifiableIterable(ImmutableCollection iterable)
Simply returns its argument.