public class DetectedLanguage extends Object implements Comparable<DetectedLanguage>
Comparable: the "better" one comes before the worse. First order by probability descending (1 to 0). Then order by language ascending (a to z).
This class is immutable.
Constructor and Description |
---|
DetectedLanguage(@NotNull LdLocale locale,
double probability) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(DetectedLanguage o)
See class header.
|
@NotNull LdLocale |
getLocale() |
double |
getProbability() |
String |
toString() |
public DetectedLanguage(@NotNull @NotNull LdLocale locale, double probability)
locale
- probability
- 0-1@NotNull public @NotNull LdLocale getLocale()
public double getProbability()
public int compareTo(DetectedLanguage o)
compareTo
in interface Comparable<DetectedLanguage>
Copyright © 2019. All rights reserved.