Record Class CommitData

java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.app.ai.CommitData
Record Components:
files - the files whose changes may be sent (not excluded, not binary content)
omitted - how many changed files are left out: excluded by the privacy patterns, binary, or beyond the limit

public record CommitData(String id, String shortId, String author, String date, String message, List<CommitData.FileData> files, int omitted) extends Record
What is known about one commit when it is described: its message and the files it changed.
  • Constructor Details

    • CommitData

      public CommitData(String id, String shortId, String author, String date, String message, List<CommitData.FileData> files, int omitted)
      Creates an instance of a CommitData record class.
      Parameters:
      id - the value for the id record component
      shortId - the value for the shortId record component
      author - the value for the author record component
      date - the value for the date record component
      message - the value for the message record component
      files - the value for the files record component
      omitted - the value for the omitted record component
  • Method Details

    • subject

      public String subject()
      The first line of the message.
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • shortId

      public String shortId()
      Returns the value of the shortId record component.
      Returns:
      the value of the shortId record component
    • author

      public String author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • date

      public String date()
      Returns the value of the date record component.
      Returns:
      the value of the date record component
    • message

      public String message()
      Returns the value of the message record component.
      Returns:
      the value of the message record component
    • files

      public List<CommitData.FileData> files()
      Returns the value of the files record component.
      Returns:
      the value of the files record component
    • omitted

      public int omitted()
      Returns the value of the omitted record component.
      Returns:
      the value of the omitted record component