Class LocaleMatcher


  • public class LocaleMatcher
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      LocaleMatcher​(java.lang.String supportedLocales)  
      LocaleMatcher​(java.lang.String[] supportedLocales)  
      LocaleMatcher​(java.util.List<java.lang.String> supportedLocales)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      LocaleMatch match​(java.lang.String desiredLocales)
      Find the desired locale that is the closed match to a supported locale, within the given threshold.
      LocaleMatch match​(java.lang.String[] desiredLocales)
      Find the desired locale that is the closed match to a supported locale, within the given threshold.
      LocaleMatch match​(java.lang.String[] desiredLocales, int threshold)
      Find the desired locale that is the closed match to a supported locale, within the given threshold.
      LocaleMatch match​(java.lang.String desiredLocales, int threshold)
      Find the desired locale that is the closed match to a supported locale, within the given threshold.
      LocaleMatch match​(java.util.List<java.lang.String> desiredLocales)
      Find the desired locale that is the closed match to a supported locale, within the given threshold.
      LocaleMatch match​(java.util.List<java.lang.String> desiredLocales, int threshold)
      Find the desired locale that is the closed match to a supported locale, within the given threshold.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LocaleMatcher

        public LocaleMatcher​(java.lang.String supportedLocales)
      • LocaleMatcher

        public LocaleMatcher​(java.lang.String[] supportedLocales)
      • LocaleMatcher

        public LocaleMatcher​(java.util.List<java.lang.String> supportedLocales)
    • Method Detail

      • match

        public LocaleMatch match​(java.lang.String desiredLocales)
        Find the desired locale that is the closed match to a supported locale, within the given threshold. Any matches whose distance is greater than or equal to the threshold will be treated as having maximum distance.
      • match

        public LocaleMatch match​(java.lang.String desiredLocales,
                                 int threshold)
        Find the desired locale that is the closed match to a supported locale, within the given threshold. Any matches whose distance is greater than or equal to the threshold will be treated as having maximum distance.
      • match

        public LocaleMatch match​(java.lang.String[] desiredLocales)
        Find the desired locale that is the closed match to a supported locale, within the given threshold. Any matches whose distance is greater than or equal to the threshold will be treated as having maximum distance.
      • match

        public LocaleMatch match​(java.lang.String[] desiredLocales,
                                 int threshold)
        Find the desired locale that is the closed match to a supported locale, within the given threshold. Any matches whose distance is greater than or equal to the threshold will be treated as having maximum distance.
      • match

        public LocaleMatch match​(java.util.List<java.lang.String> desiredLocales)
        Find the desired locale that is the closed match to a supported locale, within the given threshold. Any matches whose distance is greater than or equal to the threshold will be treated as having maximum distance.
      • match

        public LocaleMatch match​(java.util.List<java.lang.String> desiredLocales,
                                 int threshold)
        Find the desired locale that is the closed match to a supported locale, within the given threshold. Any matches whose distance is greater than or equal to the threshold will be treated as having maximum distance.