Applied-Energistics-2-tiler.../util/iterators/ChainedIterator.java
2013-12-27 16:59:59 -06:00

33 lines
470 B
Java

package appeng.util.iterators;
import java.util.Iterator;
public class ChainedIterator<T> implements Iterator<T>
{
int offset = 0;
T[] list;
public ChainedIterator(T... list) {
this.list = list;
}
@Override
public boolean hasNext()
{
return offset < list.length;
}
@Override
public T next()
{
return list[offset++];
}
@Override
public void remove()
{
throw new RuntimeException( "Not implemented." );
}
}