public class Iterables2 extends Object
com.google.common.collect.Iterables.| Modifier and Type | Method and Description |
|---|---|
static <T> T |
get(Iterable<T> iterable,
int position)
Returns the element at the specified position in an iterable.
|
@Nullable public static <T> T get(@Nonnull Iterable<T> iterable, @Nonnegative int position) throws NullPointerException, IndexOutOfBoundsException
iterable - the iterable to search intoposition - the position of the entry to returnlocation in the given iterable
throwsIndexOutOfBoundsException - if given position is negative or
greater than or equal to the size of given iterableNullPointerExceptionCopyright © 2017. All Rights Reserved.