Class PathNode
java.lang.Object
com.github.difflib.algorithm.myers.PathNode
A node in a diffpath.
-
Field Details
-
i
public final int iPosition in the original sequence. -
j
public final int jPosition in the revised sequence. -
prev
The previous node in the path. -
snake
public final boolean snake -
bootstrap
public final boolean bootstrap
-
-
Constructor Details
-
PathNode
Concatenates a new path node with an existing diffpath.- Parameters:
i
- The position in the original sequence for the new node.j
- The position in the revised sequence for the new node.prev
- The previous node in the path.
-
-
Method Details
-
isSnake
public boolean isSnake() -
isBootstrap
public boolean isBootstrap()Is this a bootstrap node?In bottstrap nodes one of the two corrdinates is less than zero.
- Returns:
- tru if this is a bootstrap node.
-
previousSnake
Skips sequences ofPathNodes
until a snake or bootstrap node is found, or the end of the path is reached.- Returns:
- The next first
PathNode
or bootstrap node in the path, ornull
if none found.
-
toString
-