this.maxTries = maxTries;
}
- @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();
}
final long maxTries) {
return new Iterable<PhoneNumberMatch>() {
- @Override
public Iterator<PhoneNumberMatch> iterator() {
return new PhoneNumberMatcher(
PhoneNumberUtil.this, text, defaultCountry, leniency, maxTries);