public List<String> next() { List<String> result = nextResult; advance(); return result; }
/** * Returns an <code>Iterator</code> over records (lists of strings) * corresponding to lines in the specified <code>Reader</code>. * * @param reader the reader to read from * @param fields how many fields to expect in each record * @param filter whether to filter lines containing wrong number of fields * @param delim a regexp on which to split lines into fields (default whitespace) */ public RecordIterator(Reader reader, int fields, boolean filter, String delim) { this.reader = new BufferedReader(reader); this.fields = fields; this.filter = filter; this.delim = delim; if (delim == null) this.delim = WHITESPACE; advance(); }