Record Class TypicalError
java.lang.Object
java.lang.Record
org.ek9lang.assist.TypicalError
- Record Components:
error- EK9 error code (e.g., "E11064")correct- Code snippet found verbatim in the Q&A code bodyincorrect- What that snippet looks like when the rule is violatedexplanation- Why the compiler rejects the incorrect form
-
Constructor Summary
ConstructorsConstructorDescriptionTypicalError(String error, String correct, String incorrect, String explanation) Creates an instance of aTypicalErrorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncorrect()Returns the value of thecorrectrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.Returns the value of theexplanationrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theincorrectrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TypicalError
Creates an instance of aTypicalErrorrecord class.- Parameters:
error- the value for theerrorrecord componentcorrect- the value for thecorrectrecord componentincorrect- the value for theincorrectrecord componentexplanation- the value for theexplanationrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
error
-
correct
-
incorrect
-
explanation
Returns the value of theexplanationrecord component.- Returns:
- the value of the
explanationrecord component
-