public int matches(int stringIndex,
CharSequence testString,
MatchResultImpl matchResult) {
int start = matchResult.getConsumed(groupIndex);
matchResult.setConsumed(groupIndex, stringIndex);
int size = children.size();
for (int i = 0; i < size; i++) {
AbstractSet e = (AbstractSet) children.get(i);
int shift = e.matches(stringIndex, testString, matchResult);
if (shift >= 0) {
// AtomicFset always returns true, but saves the index to run
// this next.match() from;
return next.matches(((AtomicFSet) fSet).getIndex(), testString,
matchResult);
}
}
matchResult.setConsumed(groupIndex, start);
return -1;
}
Returns stringIndex+shift, the next position to match |