001package org.conqat.lib.commons.collections; 002 003/** 004 * Offers the ability to perform lookahead on an ordered collection. 005 */ 006public interface ILookahead<Data, X extends Exception> { 007 008 /** 009 * Returned elements remain in the underlying data structure and are still 010 * accessible. 011 * 012 * @param index 013 * Number of elements that are looked ahead 014 * 015 * @return Element at index, or null, if the provider doesn't contain that 016 * many elements anymore 017 */ 018 public Data lookahead(int index) throws X; 019}