/guava/guava/src/com/google/common/collect/Iterables.java
: Iterators.consumingIterator( iterable.iterator( ) ) ;Iterator<? extends T> iterator = iterable.iterator( ) ;
Iterator<? extends T> iterator = iterable.iterator ( ) ;
checkNotNull(iterable); Iterators.checkNonnegative(position); if (iterable instanceof List) { List<? extends T> list = Lists.cast(iterable); return (position < list.size()) ? list.get(position) : defaultValue; } else { <extra_id_0> Iterators.advance(iterator, position); return Iterators.getNext(iterator, defaultValue); } } @ParametricNullness public static <T extends @Nullable Object> T getFirst(