Package xyz.tcheeric.jev
Record Class Question.Score
java.lang.Object
java.lang.Record
xyz.tcheeric.jev.Question.Score
- All Implemented Interfaces:
Question
- Enclosing interface:
Question
public static record Question.Score(String name, Object instructions, List<?> levels)
extends Record
implements Question
Rate the state against an ordered rubric.
levels runs from the bottom of the scale
to the top; the answer refers to each level by its index in this list.
The levels are descriptions, not numbers. The evaluator is asked which description fits and reports a probability for each, so a numeric range such as 0 to 10 cannot be expressed except by writing out every level.
-
Nested Class Summary
Nested classes/interfaces inherited from interface xyz.tcheeric.jev.Question
Question.Choice, Question.Noul, Question.Score -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinstructionsrecord component.List<?> levels()Returns the value of thelevelsrecord component.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
MIN_LEVELS
public static final int MIN_LEVELS- See Also:
-
MAX_LEVELS
public static final int MAX_LEVELS- See Also:
-
-
Constructor Details
-
Score
Creates an instance of aScorerecord class.- Parameters:
name- the value for thenamerecord componentinstructions- the value for theinstructionsrecord componentlevels- the value for thelevelsrecord component
-
-
Method Details
-
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component. -
instructions
Returns the value of theinstructionsrecord component.- Specified by:
instructionsin interfaceQuestion- Returns:
- the value of the
instructionsrecord component
-
levels
Returns the value of thelevelsrecord component.- Returns:
- the value of the
levelsrecord component
-