org.archive.util.IterableLineIterator Maven / Gradle / Ivy
The newest version!
package org.archive.util;
import java.io.Reader;
import java.util.Iterator;
import org.apache.commons.io.LineIterator;
/**
* A LineIterator that also implements Iterable, so that it can be used with
* the java enhanced for-each loop syntax.
*
* @author nlevitt
*/
public class IterableLineIterator extends LineIterator
implements Iterable {
public IterableLineIterator(final Reader reader)
throws IllegalArgumentException {
super(reader);
}
@SuppressWarnings("unchecked")
public Iterator iterator() {
return this;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy