Record Class LanguageDetector.DetectionResult
java.lang.Object
java.lang.Record
org.episteme.social.linguistics.LanguageDetector.DetectionResult
- Enclosing class:
LanguageDetector
-
Constructor Summary
ConstructorsConstructorDescriptionDetectionResult(Language detectedLanguage, double confidence, Map<Language, Double> allScores) Creates an instance of aDetectionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallScoresrecord component.doubleReturns the value of theconfidencerecord component.Returns the value of thedetectedLanguagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DetectionResult
public DetectionResult(Language detectedLanguage, double confidence, Map<Language, Double> allScores) Creates an instance of aDetectionResultrecord class.- Parameters:
detectedLanguage- the value for thedetectedLanguagerecord componentconfidence- the value for theconfidencerecord componentallScores- the value for theallScoresrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
detectedLanguage
Returns the value of thedetectedLanguagerecord component.- Returns:
- the value of the
detectedLanguagerecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
allScores
-