public final class DiffNode extends PathNode
A DiffNode and its previous node mark a delta between two input sequences, that is, two differing subsequences between (possibly zero length) matching sequences.
DiffNodes and Snakes allow for compression
of diffpaths, as each snake is represented by a single Snake
node and each contiguous series of insertions and deletions is represented
by a single DiffNodes.
| Constructor and Description |
|---|
DiffNode(int original,
int revised,
PathNode prev)
Constructs a DiffNode.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isSnake()
Is this node a
Snake node? |
isBootstrap, previousSnake, toStringpublic DiffNode(int original,
int revised,
PathNode prev)
DiffNodes are compressed. That means that
the path pointed to by the prev parameter
will be followed using PathNode.previousSnake()
until a non-diff node is found.
original - the position in the original sequencerevised - the position in the revised sequenceprev - the previous node in the path.public boolean isSnake()
Snake node?