Class DistanceTable
- java.lang.Object
-
- com.squarespace.cldrengine.locale.DistanceTable
-
public class DistanceTable extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_THRESHOLD
static int
MAX_DISTANCE
-
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.
-
-
-
Field Detail
-
MAX_DISTANCE
public static final int MAX_DISTANCE
- See Also:
- Constant Field Values
-
DEFAULT_THRESHOLD
public static final int DEFAULT_THRESHOLD
- See Also:
- Constant Field Values
-
-
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.
-
-