@Test public void testPopToWithRegexAndFollowingMatcher() { Matcher digitMatcher = Pattern.compile("\\d+").matcher(new String()); Matcher alphabeticMatcher = Pattern.compile("[a-zA-Z]").matcher(new String()); StringBuilder token = new StringBuilder(); assertEquals(-1, new CodeReader(new StringReader("123 ABC")).popTo(digitMatcher, alphabeticMatcher, token)); assertEquals("", token.toString()); assertEquals(3, new CodeReader(new StringReader("123ABC")).popTo(digitMatcher, alphabeticMatcher, token)); assertEquals("123", token.toString()); }
public final int popTo(Matcher matcher, Appendable appendable) { return popTo(matcher, null, appendable); }
CodeReader extends CodeBuffer { public final int popTo(Matcher matcher, Appendable appendable) { return popTo(matcher, null, appendable); } }
CodeReader extends CodeBuffer { public final int popTo(Matcher matcher, Appendable appendable) { return popTo(matcher, null, appendable); } CodeReader(Reader code);  CodeReader(String code);  CodeReader(Reader code, CodeReaderConfiguration configuration);  CodeReader(String code, CodeReaderConfiguration configuration); }
CodeReader extends CodeBuffer { public final int popTo(Matcher matcher, Appendable appendable) { return popTo(matcher, null, appendable); } CodeReader(Reader code);  CodeReader(String code);  CodeReader(Reader code, CodeReaderConfiguration configuration);  CodeReader(String code, CodeReaderConfiguration configuration); final void pop(Appendable appendable); final char[] peek(int length); final void peekTo(EndMatcher matcher, Appendable appendable); final int popTo(Matcher matcher, Appendable appendable); final int popTo(Matcher matcher, Matcher afterMatcher, Appendable appendable); final Cursor getPreviousCursor(); }
CodeReader extends CodeBuffer { public final int popTo(Matcher matcher, Appendable appendable) { return popTo(matcher, null, appendable); } CodeReader(Reader code);  CodeReader(String code);  CodeReader(Reader code, CodeReaderConfiguration configuration);  CodeReader(String code, CodeReaderConfiguration configuration); final void pop(Appendable appendable); final char[] peek(int length); final void peekTo(EndMatcher matcher, Appendable appendable); final int popTo(Matcher matcher, Appendable appendable); final int popTo(Matcher matcher, Matcher afterMatcher, Appendable appendable); final Cursor getPreviousCursor();  }