Interface NonGeographicalEntityMetadataSource

All Known Subinterfaces:
MetadataSource
All Known Implementing Classes:
MetadataSourceImpl

public interface NonGeographicalEntityMetadataSource
A source of phone metadata for non-geographical entities.

Non-geographical entities are phone number ranges that have a country calling code, but either do not belong to an actual country (some international services), or belong to a region which has a different country calling code from the country it is part of. Examples of such ranges are those starting with:

  • 800 - country code assigned to the Universal International Freephone Service
  • 808 - country code assigned to the International Shared Cost Service
  • 870 - country code assigned to the Pitcairn Islands
  • ...
  • Method Details

    • getMetadataForNonGeographicalRegion

      Phonemetadata.PhoneMetadata getMetadataForNonGeographicalRegion(int countryCallingCode)
      Gets phone metadata for a non-geographical entity.
      Parameters:
      countryCallingCode - the country calling code.
      Returns:
      the phone metadata for that entity, or null if there is none.
      Throws:
      IllegalArgumentException - if provided countryCallingCode does not belong to a non-geographical entity