Record Class GoalCommitLedger.RepoChanges

java.lang.Object
java.lang.Record
network.ike.plugin.ws.GoalCommitLedger.RepoChanges
Record Components:
label - the repository label shown in reports
commits - the goal-authored commits, newest first (git log order)
residue - stripped porcelain status lines left uncommitted after the run — empty on a healthy publish (#919)
Enclosing class:
GoalCommitLedger

public static record GoalCommitLedger.RepoChanges(String label, List<GoalCommitLedger.Commit> commits, List<String> residue) extends Record
One repository's ledger entry.
  • Constructor Details

    • RepoChanges

      public RepoChanges(String label, List<GoalCommitLedger.Commit> commits, List<String> residue)
      Creates an instance of a RepoChanges record class.
      Parameters:
      label - the value for the label record component
      commits - the value for the commits record component
      residue - the value for the residue record component
  • Method Details

    • hasCommits

      public boolean hasCommits()
      Whether the goal authored at least one commit in this repository.
      Returns:
      true when commits is non-empty
    • hasResidue

      public boolean hasResidue()
      Whether files were left uncommitted in this repository.
      Returns:
      true when residue is non-empty
    • 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.
    • label

      public String label()
      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • commits

      public List<GoalCommitLedger.Commit> commits()
      Returns the value of the commits record component.
      Returns:
      the value of the commits record component
    • residue

      public List<String> residue()
      Returns the value of the residue record component.
      Returns:
      the value of the residue record component