@Test public void testCountWhileMulti() { DefaultJavadocScanner scanner = scanner("kinds.txt"); { EnumSet<JavadocTokenKind> set = EnumSet.of(ASTERISK, IDENTIFIER); int count = JavadocScannerUtil.countWhile(set, scanner, 0); assertEquals(4, count); } { EnumSet<JavadocTokenKind> set = EnumSet.of(ASTERISK, IDENTIFIER, QUESTION); int count = JavadocScannerUtil.countWhile(set, scanner, 0); assertEquals(8, count); } { EnumSet<JavadocTokenKind> set = EnumSet.of(QUESTION, WHITE_SPACES); int count = JavadocScannerUtil.countWhile(set, scanner, 0); assertEquals(0, count); } { EnumSet<JavadocTokenKind> set = EnumSet.of(QUESTION, WHITE_SPACES); int count = JavadocScannerUtil.countWhile(set, scanner, 4); assertEquals(5, count); } { EnumSet<JavadocTokenKind> set = EnumSet.allOf(JavadocTokenKind.class); int count = JavadocScannerUtil.countWhile(set, scanner, 0); assertEquals(scanner.getTokens().size(), count); } }
public static int countWhile(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start) { return countWhileUntil(kinds, scanner, start, false); }
JavadocScannerUtil { public static int countWhile(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start) { return countWhileUntil(kinds, scanner, start, false); } }
JavadocScannerUtil { public static int countWhile(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start) { return countWhileUntil(kinds, scanner, start, false); } private  JavadocScannerUtil(); }
JavadocScannerUtil { public static int countWhile(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start) { return countWhileUntil(kinds, scanner, start, false); } private  JavadocScannerUtil(); static List<JavadocToken> lookaheadTokens(JavadocScanner scanner, int start, int count); static int countWhile(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start); static int countUntil(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start); static int countUntilBlockEnd(JavadocScanner scanner, int start); static int countUntilCommentEnd(JavadocScanner scanner, boolean returnMinusIfMissing, int start); static int countUntilNextPrintable(JavadocScanner scanner, int start); static int countUntilNextLineStart(JavadocScanner scanner, int start); static int consumeLineEnd(JavadocScanner scanner, boolean multiline); }
JavadocScannerUtil { public static int countWhile(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start) { return countWhileUntil(kinds, scanner, start, false); } private  JavadocScannerUtil(); static List<JavadocToken> lookaheadTokens(JavadocScanner scanner, int start, int count); static int countWhile(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start); static int countUntil(Collection<JavadocTokenKind> kinds, JavadocScanner scanner, int start); static int countUntilBlockEnd(JavadocScanner scanner, int start); static int countUntilCommentEnd(JavadocScanner scanner, boolean returnMinusIfMissing, int start); static int countUntilNextPrintable(JavadocScanner scanner, int start); static int countUntilNextLineStart(JavadocScanner scanner, int start); static int consumeLineEnd(JavadocScanner scanner, boolean multiline);  }