int check(Matcher matcher, int i, CharSequence seq) { int ch; boolean left = false; int startIndex = matcher.from; int endIndex = matcher.to; if (matcher.transparentBounds) { startIndex = 0; endIndex = matcher.getTextLength(); } if (i > startIndex) { ch = Character.codePointBefore(seq, i); left = (isWord(ch) || ((Character.getType(ch) == Character.NON_SPACING_MARK) && hasBaseCharacter(matcher, i-1, seq))); } boolean right = false; if (i < endIndex) { ch = Character.codePointAt(seq, i); right = (isWord(ch) || ((Character.getType(ch) == Character.NON_SPACING_MARK) && hasBaseCharacter(matcher, i, seq))); } else { // Tried to access char past the end matcher.hitEnd = true; // The addition of another char could wreck a boundary matcher.requireEnd = true; } return ((left ^ right) ? (right ? LEFT : RIGHT) : NONE); } boolean match(Matcher matcher, int i, CharSequence seq) {
int check(Matcher matcher, int i, CharSequence seq) { int ch; boolean left = false; int startIndex = matcher.from; int endIndex = matcher.to; if (matcher.transparentBounds) { startIndex = 0; endIndex = matcher.getTextLength(); } if (i > startIndex) { ch = Character.codePointBefore(seq, i); left = (isWord(ch) || ((Character.getType(ch) == Character.NON_SPACING_MARK) && hasBaseCharacter(matcher, i-1, seq))); } boolean right = false; if (i < endIndex) { ch = Character.codePointAt(seq, i); right = (isWord(ch) || ((Character.getType(ch) == Character.NON_SPACING_MARK) && hasBaseCharacter(matcher, i, seq))); } else { // Tried to access char past the end matcher.hitEnd = true; // The addition of another char could wreck a boundary matcher.requireEnd = true; } return ((left ^ right) ? (right ? LEFT : RIGHT) : NONE); } boolean match(Matcher matcher, int i, CharSequence seq) {
boolean match(Matcher matcher, int i, CharSequence seq) { return (check(matcher, i, seq) & type) > 0 && next.match(matcher, i, seq); } }
boolean match(Matcher matcher, int i, CharSequence seq) { return (check(matcher, i, seq) & type) > 0 && next.match(matcher, i, seq); } }