Interface MetadataBootstrappingGuard<T extends com.google.i18n.phonenumbers.metadata.source.MetadataContainer>

  • Type Parameters:
    T - needs to extend MetadataContainer

    public interface MetadataBootstrappingGuard<T extends com.google.i18n.phonenumbers.metadata.source.MetadataContainer>
    Guard that ensures that metadata bootstrapping process (loading and parsing) is triggered only once per metadata file.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T getOrBootstrap​(java.lang.String phoneMetadataFile)
      If metadata from the provided file has not yet been read, invokes loading and parsing from the provided file and adds the result to guarded MetadataContainer.
    • Method Detail

      • getOrBootstrap

        T getOrBootstrap​(java.lang.String phoneMetadataFile)
        If metadata from the provided file has not yet been read, invokes loading and parsing from the provided file and adds the result to guarded MetadataContainer.
        Parameters:
        phoneMetadataFile - to read from
        Returns:
        guarded MetadataContainer