public final class GeoEntityUtility
extends java.lang.Object
RegionMetadataSource
and NonGeographicalEntityMetadataSource
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
REGION_CODE_FOR_NON_GEO_ENTITIES
Region code with a special meaning, used to mark non-geographical entities
|
Modifier and Type | Method and Description |
---|---|
static boolean |
isGeoEntity(int countryCallingCode)
Determines whether
countryCallingCode belongs to a geographical entity. |
static boolean |
isGeoEntity(java.lang.String regionCode)
Determines whether
regionCode belongs to a geographical entity. |
public static final java.lang.String REGION_CODE_FOR_NON_GEO_ENTITIES
public static boolean isGeoEntity(java.lang.String regionCode)
regionCode
belongs to a geographical entity.public static boolean isGeoEntity(int countryCallingCode)
countryCallingCode
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 entities
Note that this method will not throw an exception even when the underlying mapping for the
countryCallingCode
does not exist, instead it will return false
Copyright © 2022 Google. All Rights Reserved.