-
- All Implemented Interfaces:
-
io.michaelrocks.libphonenumber.android.metadata.source.FormattingMetadataSource
public final class FormattingMetadataSourceImpl implements FormattingMetadataSource
Implementation of FormattingMetadataSource guarded by MetadataBootstrappingGuard
By default, a BlockingMetadataBootstrappingGuard will be used, but any custom implementation can be injected.
-
-
Constructor Summary
Constructors Constructor Description FormattingMetadataSourceImpl(PhoneMetadataFileNameProvider phoneMetadataFileNameProvider, MetadataBootstrappingGuard<MapBackedMetadataContainer<Integer>> bootstrappingGuard)FormattingMetadataSourceImpl(PhoneMetadataFileNameProvider phoneMetadataFileNameProvider, MetadataLoader metadataLoader, MetadataParser metadataParser)
-
Method Summary
Modifier and Type Method Description Phonemetadata.PhoneMetadatagetFormattingMetadataForCountryCallingCode(int countryCallingCode)Returns formatting phone metadata for provided country calling code. -
-
Constructor Detail
-
FormattingMetadataSourceImpl
FormattingMetadataSourceImpl(PhoneMetadataFileNameProvider phoneMetadataFileNameProvider, MetadataBootstrappingGuard<MapBackedMetadataContainer<Integer>> bootstrappingGuard)
-
FormattingMetadataSourceImpl
FormattingMetadataSourceImpl(PhoneMetadataFileNameProvider phoneMetadataFileNameProvider, MetadataLoader metadataLoader, MetadataParser metadataParser)
-
-
Method Detail
-
getFormattingMetadataForCountryCallingCode
Phonemetadata.PhoneMetadata getFormattingMetadataForCountryCallingCode(int countryCallingCode)
Returns formatting phone metadata for provided country calling code.
This method is similar to the one in , except that itwill not fail for geographical regions, it can be used for both geo- and non-geo entities.
In case the provided
{@code countryCallingCode}maps to several different regions, only onewould contain formatting metadata.
-
-
-
-