Record Class ModelHashes

java.lang.Object
java.lang.Record
ch.so.agi.mcp.model.ModelHashes

public record ModelHashes(@Nullable String model, @Nullable String before, @Nullable String after, @Nullable String candidate) extends Record
Identifies exact UTF-8 model text, not compilation success or imported dependencies.
  • Constructor Details

    • ModelHashes

      public ModelHashes(@Nullable String model, @Nullable String before, @Nullable String after, @Nullable String candidate)
      Creates an instance of a ModelHashes record class.
      Parameters:
      model - the value for the model record component
      before - the value for the before record component
      after - the value for the after record component
      candidate - the value for the candidate record component
  • Method Details

    • sha256

      public static @Nullable String sha256(@Nullable String text)
    • model

      public static ModelHashes model(@Nullable String text)
    • change

      public static ModelHashes change(@Nullable String before, @Nullable String after)
    • attach

      public static Map<String,Object> attach(Map<String,Object> result, ModelHashes hashes)
    • attach

      public static IliAuthoringResult attach(IliAuthoringResult result, @Nullable String before)
    • 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.
    • model

      public @Nullable String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • before

      public @Nullable String before()
      Returns the value of the before record component.
      Returns:
      the value of the before record component
    • after

      public @Nullable String after()
      Returns the value of the after record component.
      Returns:
      the value of the after record component
    • candidate

      public @Nullable String candidate()
      Returns the value of the candidate record component.
      Returns:
      the value of the candidate record component