Class diff_match_patch.Diff

  • Direct Known Subclasses:
    Diff
    Enclosing class:
    diff_match_patch

    public static class diff_match_patch.Diff
    extends Object
    Class representing one diff operation.
    • Constructor Detail

      • Diff

        public Diff​(diff_match_patch.Operation operation,
                    String text)
        Constructor. Initializes the diff with the provided values.
        Parameters:
        operation - One of INSERT, DELETE or EQUAL
        text - The text being applied
    • Method Detail

      • toString

        public String toString()
        Display a human-readable version of this Diff.
        Overrides:
        toString in class Object
        Returns:
        text version
      • equals

        public boolean equals​(Object d)
        Is this Diff equivalent to another Diff?
        Overrides:
        equals in class Object
        Parameters:
        d - Another Diff to compare against
        Returns:
        true or false