Record Class ReadabilityIndex.ReadabilityResult
java.lang.Object
java.lang.Record
org.episteme.social.linguistics.ReadabilityIndex.ReadabilityResult
- All Implemented Interfaces:
Serializable
- Enclosing class:
ReadabilityIndex
public static record ReadabilityIndex.ReadabilityResult(double score, String indexName, String gradeLevel, String interpretation)
extends Record
implements Serializable
Encapsulates the evaluation of a readability calculation.
- Since:
- 1.0
- Version:
- 2.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReadabilityResult(double score, String indexName, String gradeLevel, String interpretation) Creates an instance of aReadabilityResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thegradeLevelrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theindexNamerecord component.Returns the value of theinterpretationrecord component.doublescore()Returns the value of thescorerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReadabilityResult
Creates an instance of aReadabilityResultrecord class.- Parameters:
score- the value for thescorerecord componentindexName- the value for theindexNamerecord componentgradeLevel- the value for thegradeLevelrecord componentinterpretation- the value for theinterpretationrecord 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. -
score
public double score()Returns the value of thescorerecord component.- Returns:
- the value of the
scorerecord component
-
indexName
Returns the value of theindexNamerecord component.- Returns:
- the value of the
indexNamerecord component
-
gradeLevel
Returns the value of thegradeLevelrecord component.- Returns:
- the value of the
gradeLevelrecord component
-
interpretation
Returns the value of theinterpretationrecord component.- Returns:
- the value of the
interpretationrecord component
-