Record Class LanguageComparison
java.lang.Object
java.lang.Record
org.ek9lang.assist.LanguageComparison
- Record Components:
language- The comparison language (e.g., "Java", "Kotlin", "Rust")comparison- How the other language handles this patternek9Approach- How EK9 handles this pattern differentlywhyDifferent- Why EK9 chose a different approach
public record LanguageComparison(String language, String comparison, String ek9Approach, String whyDifferent)
extends Record
Describes how EK9 handles a pattern differently from another language.
Used in negative training examples to teach LLMs about EK9's design choices
relative to languages developers already know.
-
Constructor Summary
ConstructorsConstructorDescriptionLanguageComparison(String language, String comparison, String ek9Approach, String whyDifferent) Creates an instance of aLanguageComparisonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecomparisonrecord component.Returns the value of theek9Approachrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.language()Returns the value of thelanguagerecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewhyDifferentrecord component.
-
Constructor Details
-
LanguageComparison
public LanguageComparison(String language, String comparison, String ek9Approach, String whyDifferent) Creates an instance of aLanguageComparisonrecord class.- Parameters:
language- the value for thelanguagerecord componentcomparison- the value for thecomparisonrecord componentek9Approach- the value for theek9Approachrecord componentwhyDifferent- the value for thewhyDifferentrecord 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). -
language
-
comparison
Returns the value of thecomparisonrecord component.- Returns:
- the value of the
comparisonrecord component
-
ek9Approach
Returns the value of theek9Approachrecord component.- Returns:
- the value of the
ek9Approachrecord component
-
whyDifferent
Returns the value of thewhyDifferentrecord component.- Returns:
- the value of the
whyDifferentrecord component
-