android/guava/src/com/google/common/collect/Iterators.java
public static <T> T get(Iterator<T> iterator, int position) {
    checkNonnegative(position);
    int skipped = advance(iterator, position);
    if (!iterator.hasNext()) {
      throw new IndexOutOfBoundsException(
          "position ("
              + position
              + ") must be less than the number of elements that remained ("
              + skipped
              + ")");
    }
    return iterator.next();
  }
public static <T> T get(Iterator<T> iterator, int position) {
    checkNonnegative(position);
    int skipped = advance(iterator, position);
    if (!iterator.hasNext()) {
      throw new IndexOutOfBoundsException(
          "position ("
              + position
              + ") must be less than the number of elements that remained ("
              + skipped
              + ")");
    }
    return iterator.next();
  }
Advances {@code iterator} {@code position + 1} times, returning the element at the {@code
position}th position.

@param position position of the element to return
@return the element at the specified position in {@code iterator}
@throws IndexOutOfBoundsException if {@code position} is negative or greater than or equal to
the number of elements remaining in {@code iterator}