@Test public void testLookahead() { DefaultJavadocTokenStream stream = stream("alphabets.txt"); assertEquals("a", stream.lookahead(0).getText()); assertEquals("a", stream.lookahead(0).getText()); assertEquals("b", stream.lookahead(2).getText()); assertEquals("c", stream.lookahead(4).getText()); assertEquals("d", stream.lookahead(6).getText()); assertEquals("e", stream.lookahead(8).getText()); stream.nextToken(); assertEquals("b", stream.lookahead(1).getText()); assertEquals("c", stream.lookahead(3).getText()); assertEquals("d", stream.lookahead(5).getText()); }
@Override public JavadocToken lookahead(int k) { return scanner.lookahead(k); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public JavadocToken lookahead(int k) { return scanner.lookahead(k); } }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public JavadocToken lookahead(int k) { return scanner.lookahead(k); } DefaultJavadocTokenStream(JavadocScanner scanner); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public JavadocToken lookahead(int k) { return scanner.lookahead(k); } 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 JavadocToken lookahead(int k) { return scanner.lookahead(k); } DefaultJavadocTokenStream(JavadocScanner scanner); @Override JavadocToken peek(); @Override JavadocToken lookahead(int k); @Override JavadocToken nextToken(); @Override void mark(); @Override void rewind(); @Override void discard();  }