Class EditClassCount.Occurrences

java.lang.Object
org.variantsync.diffdetective.metadata.EditClassCount.Occurrences
Enclosing class:
EditClassCount

public static class EditClassCount.Occurrences extends Object
Counts the occurrences of a data point across commits.
  • Field Details

    • ISEMIGROUP

      public static org.variantsync.functjonal.category.InplaceSemigroup<EditClassCount.Occurrences> ISEMIGROUP
      Combine two occurrences by adding their counts and performing a set union on the set of origin commits.
    • totalAmount

      private int totalAmount
    • uniqueCommits

      private final HashSet<String> uniqueCommits
  • Constructor Details

    • Occurrences

      public Occurrences()
  • Method Details

    • increment

      public void increment(CommitDiff commit)
      Report the occurrence of a relevant data point in the given CommitDiff.
      Parameters:
      commit - The commit in which a match was found.
    • getTotalAmount

      public int getTotalAmount()
      Returns the amount how often a data point was found.
    • getAmountOfUniqueCommits

      public int getAmountOfUniqueCommits()
      Returns the set of all commits in which a data point was found.
    • toString

      public String toString()
      Overrides:
      toString in class Object