Class Difference.Part

java.lang.Object
org.netbeans.api.diff.Difference.Part
All Implemented Interfaces:
Serializable
Enclosing class:
Difference

public static final class Difference.Part extends Object implements Serializable
This class represents a difference on a single line.
See Also:
  • Constructor Details

    • Part

      public Part(int type, int line, int pos1, int pos2)
      Creates a new instance of LineDiff
      Parameters:
      type - The type of the difference. Must be one of the DELETE, ADD or CHANGE
      line - The line number
      pos1 - The position on which the difference starts on this line.
      pos2 - The position on which the difference ends on this line.
  • Method Details

    • getType

      public int getType()
      Get the difference type. It's one of DELETE, ADD or CHANGE.
    • getLine

      public int getLine()
      Get the line number.
    • getStartPosition

      public int getStartPosition()
      Get the position on which the difference starts on this line.
    • getEndPosition

      public int getEndPosition()
      Get the position on which the difference ends on this line.