Record Class SequenceResult

java.lang.Object
java.lang.Record
io.github.jbastgen.stemma.git.api.SequenceResult
Record Components:
status - what happened
conflicts - paths with conflicts when it stopped on SequenceResult.Status.CONFLICTS: resolve them and stage them, then GitRepository.sequenceContinue(), or skip the commit, or abort
applied - commits that were made so far
skipped - commits that were left out so far: they changed nothing (already there) or were skipped on request
remaining - commits that are still to do after the one that stopped (0 when SequenceResult.Status.DONE)

public record SequenceResult(SequenceResult.Status status, List<String> conflicts, int applied, int skipped, int remaining) extends Record
Outcome of a cherry-pick or revert, or of a step after a conflict.
  • Constructor Details

    • SequenceResult

      public SequenceResult(SequenceResult.Status status, List<String> conflicts, int applied, int skipped, int remaining)
      Creates an instance of a SequenceResult record class.
      Parameters:
      status - the value for the status record component
      conflicts - the value for the conflicts record component
      applied - the value for the applied record component
      skipped - the value for the skipped record component
      remaining - the value for the remaining record component
  • Method Details

    • hasConflicts

      public boolean hasConflicts()
      Whether the sequence stopped on a conflict and waits.
    • 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.
    • status

      public SequenceResult.Status status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • conflicts

      public List<String> conflicts()
      Returns the value of the conflicts record component.
      Returns:
      the value of the conflicts record component
    • applied

      public int applied()
      Returns the value of the applied record component.
      Returns:
      the value of the applied record component
    • skipped

      public int skipped()
      Returns the value of the skipped record component.
      Returns:
      the value of the skipped record component
    • remaining

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