Class DistanceTable


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

      Constructors 
      Constructor Description
      DistanceTable()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static int distance​(LanguageTag desired, LanguageTag supported)
      Returns the distance between the desired and supported locale, using the default distance threshold.
      static int distance​(LanguageTag desired, LanguageTag supported, int threshold)
      Returns the distance between the desired and supported locale, using the given distance threshold.
      • Methods inherited from class java.lang.Object

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

      • DistanceTable

        public DistanceTable()
    • Method Detail

      • distance

        public static int distance​(LanguageTag desired,
                                   LanguageTag supported)
        Returns the distance between the desired and supported locale, using the default distance threshold.
      • distance

        public static int distance​(LanguageTag desired,
                                   LanguageTag supported,
                                   int threshold)
        Returns the distance between the desired and supported locale, using the given distance threshold. Any distance equal to or greater than the threshold will return the maximum distance.