Class Diff

java.lang.Object
fr.becpg.common.diff.Diff

public class Diff extends Object
Class representing one diff operation.
Author:
matthieu
  • Field Details

    • operation

      private Operation operation
      One of: INSERT, DELETE or EQUAL.
    • text

      private String text
      The dmp associated with this diff operation.
  • Constructor Details

    • Diff

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

    • getOperation

      public Operation getOperation()

      Getter for the field operation.

      Returns:
      a Operation object
      Since:
      23.2.1.26
    • setOperation

      public void setOperation(Operation operation)

      Setter for the field operation.

      Parameters:
      operation - a Operation object
      Since:
      23.2.1.26
    • getText

      public String getText()

      Getter for the field text.

      Returns:
      a String object
      Since:
      23.2.1.26
    • setText

      public void setText(String text)

      Setter for the field text.

      Parameters:
      text - a String object
      Since:
      23.2.1.26
    • toString

      public String toString()
      Display a human-readable version of this Diff.
      Overrides:
      toString in class Object
      Returns:
      dmp 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
    • equals

      public boolean equals(Object obj)
      Is this Diff equivalent to another Diff?
      Overrides:
      equals in class Object