@Test public void testDiscard() { 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.discard(); assertEquals("d", stream.nextToken().getText()); stream.rewind(); assertEquals("b", stream.nextToken().getText()); stream.discard(); assertEquals("c", stream.nextToken().getText()); try { stream.discard(); fail(); } catch (IllegalStateException e) { } }
@Override public void discard() { fetchMark(); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void discard() { fetchMark(); } }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void discard() { fetchMark(); } DefaultJavadocTokenStream(JavadocScanner scanner); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void discard() { fetchMark(); } 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 discard() { fetchMark(); } DefaultJavadocTokenStream(JavadocScanner scanner); @Override JavadocToken peek(); @Override JavadocToken lookahead(int k); @Override JavadocToken nextToken(); @Override void mark(); @Override void rewind(); @Override void discard();  }