@Test public void getCurrentLine() { assertEquals("FIRST", lineSequence.getCurrentLine().getText()); lineSequence.advance(); assertEquals("SECOND", lineSequence.getCurrentLine().getText()); lineSequence.advance(); assertNull(lineSequence.getCurrentLine()); }
@Override public Line getCurrentLine() { Line line = delegate.getCurrentLine(); if (line != null) { line = transform.apply(line); } return line; }
TransformLineSequence extends LineSequence { @Override public Line getCurrentLine() { Line line = delegate.getCurrentLine(); if (line != null) { line = transform.apply(line); } return line; } }
TransformLineSequence extends LineSequence { @Override public Line getCurrentLine() { Line line = delegate.getCurrentLine(); if (line != null) { line = transform.apply(line); } return line; } TransformLineSequence(LineSequence delegate, Function<Line, Line> transform); }
TransformLineSequence extends LineSequence { @Override public Line getCurrentLine() { Line line = delegate.getCurrentLine(); if (line != null) { line = transform.apply(line); } return line; } TransformLineSequence(LineSequence delegate, Function<Line, Line> transform); @Override Line getCurrentLine(); @Override Line getNextLine(); @Override void advance(); @Override LineSequence lookAhead(); }
TransformLineSequence extends LineSequence { @Override public Line getCurrentLine() { Line line = delegate.getCurrentLine(); if (line != null) { line = transform.apply(line); } return line; } TransformLineSequence(LineSequence delegate, Function<Line, Line> transform); @Override Line getCurrentLine(); @Override Line getNextLine(); @Override void advance(); @Override LineSequence lookAhead();  }