public AsciiLineReaderIterator(final AsciiLineReader asciiLineReader) { this.asciiLineReader = asciiLineReader; this.i = new TupleIterator(); }
/** * Returns the byte position at the end of the most-recently-read line (a.k.a., the beginning of the next line) from {@link #next()} in * the underlying {@link AsciiLineReader}. */ @Override public long getPosition() { return i.getPosition(); }
public TupleIterator() { hasNext(); // Initialize the iterator, which appears to be a requirement of the parent class. TODO: Really? }
public TupleIterator() { hasNext(); // Initialize the iterator, which appears to be a requirement of the parent class. TODO: Really? }
public TupleIterator() { hasNext(); // Initialize the iterator, which appears to be a requirement of the parent class. TODO: Really? }
@Override public boolean hasNext() { return i.hasNext(); }
@Override public boolean hasNext() { return i.hasNext(); }
@Override public String peek() { return i.peek().a; }
@Override public void remove() { i.remove(); }
public AsciiLineReaderIterator(final AsciiLineReader asciiLineReader) { this.asciiLineReader = asciiLineReader; this.i = new TupleIterator(); }
@Override public void remove() { i.remove(); }
@Override public String peek() { return i.peek().a; }
@Override public boolean hasNext() { return i.hasNext(); }
/** Returns the byte position at the beginning of the next line. */ @Override public long getPosition() { final Tuple<String, Long> peek = peek(); // Be careful: peek will be null at the end of the stream. return peek != null ? peek.b : asciiLineReader.getPosition(); } }
/** Returns the byte position at the beginning of the next line. */ @Override public long getPosition() { final Tuple<String, Long> peek = peek(); // Be careful: peek will be null at the end of the stream. return peek != null ? peek.b : asciiLineReader.getPosition(); } }
@Override public String next() { current = i.next(); return current.a; }
@Override public void remove() { i.remove(); }
@Override public String next() { current = i.next(); return current.a; }
public AsciiLineReaderIterator(final AsciiLineReader asciiLineReader) { this.asciiLineReader = asciiLineReader; this.i = new TupleIterator(); }
@Override public String peek() { return i.peek().a; }