List of usage examples for java.util Iterator interface-usage
From source file LineIterator.java
/**
* An Iterator over the lines in a <code>Reader</code>.
* <p>
* <code>LineIterator</code> holds a reference to an open <code>Reader</code>.
* When you have finished with the iterator you should close the reader
* to free internal resources. This can be done by closing the reader directly,
From source file com.yahoo.bard.webservice.util.IntervalPeriodIterator.java
/** * An iterator that splits an interval into slices of length equal to a period and returns them * <p> * The slices returned are aligned to the interval start. Any partial slice at the end will return the remaining time. */ public class IntervalPeriodIterator implements Iterator<Interval> {
From source file org.javafunk.funk.iterators.MappedIterator.java
public class MappedIterator<S, T> implements Iterator<T> { private Iterator<? extends S> iterator; private UnaryFunction<? super S, ? extends T> function; public MappedIterator(Iterator<? extends S> iterator, UnaryFunction<? super S, ? extends T> mapper) { this.iterator = checkNotNull(iterator);
From source file com.livinglogic.dbutils.ResultSetMapIterator.java
public class ResultSetMapIterator implements Iterator<Map<String, Object>> { private ResultSet resultSet; private ResultSetMetaData metaData; private int numberOfColumns; Map<String, Object> nextRecord;
From source file org.javafunk.funk.iterators.BatchedIterator.java
public class BatchedIterator<T> implements Iterator<Iterable<T>> { private Iterator<? extends T> iterator; private int batchSize; public BatchedIterator(Iterator<? extends T> iterator, int batchSize) { this.iterator = checkNotNull(iterator);
From source file org.javafunk.funk.iterators.ChainedIterator.java
public class ChainedIterator<T> implements Iterator<T> { private Iterator<? extends Iterator<? extends T>> iteratorsIterator; private Iterator<? extends T> currentIterator; public ChainedIterator(Iterator<? extends Iterator<? extends T>> iteratorsIterator) { this.iteratorsIterator = iteratorsIterator;
From source file com.michaelwitbrock.jacksonstream.JsonArrayStreamDataSupplier.java
public class JsonArrayStreamDataSupplier<T> implements Iterator<T> { /* * This class wraps the Jackson streaming API for arrays (a common kind of * large JSON file) in a Java 8 Stream. The initial motivation was that * use of a default objectmapper to a Java array was crashing for me on * a very large JSON file (> 1GB). And there didn't seem to be good example
From source file org.javalite.activeweb.FormItemIterator.java
/** * @author Igor Polevoy */ class FormItemIterator implements Iterator<FormItem> { private FileItemIterator it;
From source file marmot.tokenize.preprocess.WikiReader.java
public class WikiReader implements Iterator<Pair> { private Pair pair_; private InternalReader untokenized_; private InternalReader tokenized_; private boolean expand_;
From source file org.javafunk.funk.iterators.CyclicIterator.java
public class CyclicIterator<T> implements Iterator<T> { private Iterator<? extends T> iterator; private Integer numberOfTimesToRepeat; private List<T> elements = new ArrayList<T>(); private int repeats = 0; private int index = 0;