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 pattern
ek9Approach - How EK9 handles this pattern differently
whyDifferent - 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 Details

    • LanguageComparison

      public LanguageComparison(String language, String comparison, String ek9Approach, String whyDifferent)
      Creates an instance of a LanguageComparison record class.
      Parameters:
      language - the value for the language record component
      comparison - the value for the comparison record component
      ek9Approach - the value for the ek9Approach record component
      whyDifferent - the value for the whyDifferent 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • language

      public String language()
      Returns the value of the language record component.
      Returns:
      the value of the language record component
    • comparison

      public String comparison()
      Returns the value of the comparison record component.
      Returns:
      the value of the comparison record component
    • ek9Approach

      public String ek9Approach()
      Returns the value of the ek9Approach record component.
      Returns:
      the value of the ek9Approach record component
    • whyDifferent

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