@Test public void testMark() { DefaultJavadocTokenStream stream = stream("blank-lines.txt"); stream.mark(); assertEquals("a", stream.nextToken().getText()); stream.mark(); assertEquals("b", stream.nextToken().getText()); stream.mark(); assertEquals("c", stream.nextToken().getText()); stream.mark(); assertEquals("d", stream.nextToken().getText()); stream.rewind(); assertEquals("d", stream.nextToken().getText()); stream.rewind(); assertEquals("c", stream.nextToken().getText()); stream.rewind(); assertEquals("b", stream.nextToken().getText()); stream.rewind(); assertEquals("a", stream.nextToken().getText()); }
@Override public void mark() { marks.addFirst(scanner.getIndex()); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void mark() { marks.addFirst(scanner.getIndex()); } }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void mark() { marks.addFirst(scanner.getIndex()); } DefaultJavadocTokenStream(JavadocScanner scanner); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void mark() { marks.addFirst(scanner.getIndex()); } DefaultJavadocTokenStream(JavadocScanner scanner); @Override JavadocToken peek(); @Override JavadocToken lookahead(int k); @Override JavadocToken nextToken(); @Override void mark(); @Override void rewind(); @Override void discard(); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void mark() { marks.addFirst(scanner.getIndex()); } DefaultJavadocTokenStream(JavadocScanner scanner); @Override JavadocToken peek(); @Override JavadocToken lookahead(int k); @Override JavadocToken nextToken(); @Override void mark(); @Override void rewind(); @Override void discard();  }