*/
private PhoneNumberMatch extractInnerMatch(String candidate, int offset) {
for (Pattern possibleInnerMatch : INNER_MATCHES) {
- int rangeStart = 0;
Matcher groupMatcher = possibleInnerMatch.matcher(candidate);
boolean isFirstMatch = true;
while (groupMatcher.find() && maxTries > 0) {
return true;
}
+ @Override
public boolean hasNext() {
if (state == State.NOT_READY) {
lastMatch = find(searchIndex);
return state == State.READY;
}
+ @Override
public PhoneNumberMatch next() {
// Check the state and find the next match as a side-effect if necessary.
if (!hasNext()) {
/**
* Always throws {@link UnsupportedOperationException} as removal is not supported.
*/
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}