public boolean isValidNumber(PhoneNumber number){
  String regionCode=getRegionCodeForNumber(number);
  return isValidNumberForRegion(number,regionCode);
}

public boolean isValidNumber ( PhoneNumber number ) { String regionCode = getRegionCodeForNumber ( number ) ; return isValidNumberForRegion ( number , regionCode ) ; }
tests whether a phone number matches a valid pattern . note this doesn ' t verify the number is actually in use , which is impossible to tell by just looking at a number itself .
