android/guava/src/com/google/common/collect/Iterators.java
static <T> UnmodifiableListIterator<T> forArray(
      final T[] array, final int offset, int length, int index) {
    checkArgument(length >= 0);
    int end = offset + length;

    // Technically we should give a slightly more descriptive error on overflow
    Preconditions.checkPositionIndexes(offset, end, array.length);
    Preconditions.checkPositionIndex(index, length);
    if (length == 0) {
      return emptyListIterator();
    }
    return new ArrayItr<T>(array, offset, length, index);
  }
static <T> UnmodifiableListIterator<T> forArray(
      final T[] array, final int offset, int length, int index) {
    checkArgument(length >= 0);
    int end = offset + length;

    // Technically we should give a slightly more descriptive error on overflow
    Preconditions.checkPositionIndexes(offset, end, array.length);
    Preconditions.checkPositionIndex(index, length);
    if (length == 0) {
      return emptyListIterator();
    }
    return new ArrayItr<T>(array, offset, length, index);
  }
static < T > UnmodifiableListIterator < T > forArray ( final T [ ] array , final int offset , int length , int index ) { checkArgument ( length >= 0 ) ; int end = offset + length ; // Technically we should give a slightly more descriptive error on overflow Preconditions . checkPositionIndexes ( offset , end , array . length ) ; Preconditions . checkPositionIndex ( index , length ) ; if ( length == 0 ) { return emptyListIterator ( ) ; } return new ArrayItr < T > ( array , offset , length , index ) ; }
Returns a list iterator containing the elements in the specified range of {@code array} in
order, starting at the specified index.

<p>The {@code Iterable} equivalent of this method is {@code
Arrays.asList(array).subList(offset, offset + length).listIterator(index)}.
Returns a list iterator containing the elements in the specified range of { @code array } in order starting at the specified index .