private static Iterator < ? > seek ( ELContext context , Object base , Object property ) { if ( base instanceof Iterable < ? > ) { context . setPropertyResolved ( true ) ; int index = toIndex ( context , property ) ; if ( index >= 0 ) { Iterator < ? > result = ( ( Iterable < ? > ) base ) . iterator ( ) ; for ( int i = 0 ; i < index && result . hasNext ( ) ; i ++ ) { result . next ( ) ; } if ( result . hasNext ( ) ) { return result ; } throw new PropertyNotFoundException ( String . valueOf ( property ) ) ; } } return null ; }
Establishes an Iterator and advances it to the specified index . If this operation succeeds the context will be set as having been resolved .