Class DiffCalculator


  • public class DiffCalculator
    extends Object
    Compares Strings to find differences. This is kind of a wrapper of the diff_match_patch class created by google.
    Version:
    $Id: DiffCalculator.java 11649 2008-06-24 15:25:14Z baranda $
    Author:
    Bruno Aranda (baranda@ebi.ac.uk)
    • Constructor Detail

      • DiffCalculator

        public DiffCalculator()

        Constructor for DiffCalculator.

    • Method Detail

      • calculateDiffs

        public List<Diff> calculateDiffs​(String str1,
                                         String str2)

        calculateDiffs.

        Parameters:
        str1 - a String object.
        str2 - a String object.
        Returns:
        a List object.
      • calculateDiffs

        public List<Diff> calculateDiffs​(String str1,
                                         String str2,
                                         boolean checkLines)

        calculateDiffs.

        Parameters:
        str1 - a String object.
        str2 - a String object.
        checkLines - a boolean.
        Returns:
        a List object.
      • setTimeOut

        public void setTimeOut​(float timeout)

        setTimeOut.

        Parameters:
        timeout - a float.