java.lang.Object
io.github.jbastgen.stemma.app.model.Diffs

public final class Diffs extends Object
Parses unified diffs and produces the sample diffs shown by the prototype UI.
  • Method Details

    • parse

      public static List<DiffLine> parse(String src)
      Reads a unified diff (hunks only) into lines with old and new line numbers; a hunk header is a line of its own.
    • forFile

      public static List<DiffLine> forFile(FileChange f)
      The diff lines of a file of the demo data, generated once and kept.
    • added

      public static int added(List<DiffLine> lines)
      How many lines were added.
    • removed

      public static int removed(List<DiffLine> lines)
      How many lines were removed.