java.lang.Object
com.jsql.model.injection.strategy.blind.patch.Diff
All Implemented Interfaces:
Comparable<Diff>

public class Diff extends Object implements Comparable<Diff>
Class representing one diff operation.
  • Constructor Details

    • Diff

      public Diff(DiffMatchPatch.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 Details

    • toString

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

      public int hashCode()
      Create a numeric hash value for a Diff. This function is not used by DMP.
      Overrides:
      hashCode in class Object
      Returns:
      Hash value.
    • equals

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

      public int compareTo(Diff arg0)
      Specified by:
      compareTo in interface Comparable<Diff>
    • getOperation

      public DiffMatchPatch.Operation getOperation()
    • setOperation

      public void setOperation(DiffMatchPatch.Operation operation)
    • getText

      public String getText()
    • setText

      public void setText(String text)