Record Class SentimentToneAnalyzer.SentimentScore

java.lang.Object
java.lang.Record
org.episteme.social.linguistics.SentimentToneAnalyzer.SentimentScore
Enclosing class:
SentimentToneAnalyzer

public static record SentimentToneAnalyzer.SentimentScore(double positivity, double negativity, double subjectivity, String dominantTone) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    SentimentScore(double positivity, double negativity, double subjectivity, String dominantTone)
    Creates an instance of a SentimentScore record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the dominantTone record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the negativity record component.
    double
    Returns the value of the positivity record component.
    double
    Returns the value of the subjectivity record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SentimentScore

      public SentimentScore(double positivity, double negativity, double subjectivity, String dominantTone)
      Creates an instance of a SentimentScore record class.
      Parameters:
      positivity - the value for the positivity record component
      negativity - the value for the negativity record component
      subjectivity - the value for the subjectivity record component
      dominantTone - the value for the dominantTone record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • positivity

      public double positivity()
      Returns the value of the positivity record component.
      Returns:
      the value of the positivity record component
    • negativity

      public double negativity()
      Returns the value of the negativity record component.
      Returns:
      the value of the negativity record component
    • subjectivity

      public double subjectivity()
      Returns the value of the subjectivity record component.
      Returns:
      the value of the subjectivity record component
    • dominantTone

      public String dominantTone()
      Returns the value of the dominantTone record component.
      Returns:
      the value of the dominantTone record component