Record Class SentimentToneAnalyzer.SentimentScore
java.lang.Object
java.lang.Record
org.episteme.social.linguistics.SentimentToneAnalyzer.SentimentScore
- Enclosing class:
SentimentToneAnalyzer
-
Constructor Summary
ConstructorsConstructorDescriptionSentimentScore(double positivity, double negativity, double subjectivity, String dominantTone) Creates an instance of aSentimentScorerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedominantTonerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thenegativityrecord component.doubleReturns the value of thepositivityrecord component.doubleReturns the value of thesubjectivityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SentimentScore
public SentimentScore(double positivity, double negativity, double subjectivity, String dominantTone) Creates an instance of aSentimentScorerecord class.- Parameters:
positivity- the value for thepositivityrecord componentnegativity- the value for thenegativityrecord componentsubjectivity- the value for thesubjectivityrecord componentdominantTone- the value for thedominantTonerecord 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. -
positivity
public double positivity()Returns the value of thepositivityrecord component.- Returns:
- the value of the
positivityrecord component
-
negativity
public double negativity()Returns the value of thenegativityrecord component.- Returns:
- the value of the
negativityrecord component
-
subjectivity
public double subjectivity()Returns the value of thesubjectivityrecord component.- Returns:
- the value of the
subjectivityrecord component
-
dominantTone
Returns the value of thedominantTonerecord component.- Returns:
- the value of the
dominantTonerecord component
-