Class GeoEntityUtility
java.lang.Object
com.google.i18n.phonenumbers.internal.GeoEntityUtility
Utility class for checking whether identifiers region code and country calling code belong
to geographical entities. For more information about geo vs. non-geo entities see
RegionMetadataSource
and NonGeographicalEntityMetadataSource
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Region code with a special meaning, used to mark non-geographical entities -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isGeoEntity
(int countryCallingCode) Determines whethercountryCallingCode
belongs to a geographical entity.static boolean
isGeoEntity
(String regionCode) Determines whetherregionCode
belongs to a geographical entity.
-
Field Details
-
REGION_CODE_FOR_NON_GEO_ENTITIES
Region code with a special meaning, used to mark non-geographical entities- See Also:
-
-
Method Details
-
isGeoEntity
Determines whetherregionCode
belongs to a geographical entity. -
isGeoEntity
public static boolean isGeoEntity(int countryCallingCode) Determines whethercountryCallingCode
belongs to a geographical entity.A single country calling code could map to several different regions. It is considered that
countryCallingCode
belongs to a geo entity if all of these regions are geo entitiesNote that this method will not throw an exception even when the underlying mapping for the
countryCallingCode
does not exist, instead it will returnfalse
-