Package org.assertj.core.util.diff.myers
Class DiffNode
- java.lang.Object
-
- org.assertj.core.util.diff.myers.PathNode
-
- org.assertj.core.util.diff.myers.DiffNode
-
public final class DiffNode extends PathNode
Copy from https://code.google.com/p/java-diff-utils/.A diffnode in a diffpath.
A DiffNode and its previous node mark a delta between two input sequences, that is, two differing subsequences between (possibly zero length) matching sequences.
DiffNodesandSnakesallow for compression of diffpaths, as each snake is represented by a singleSnakenode and each contiguous series of insertions and deletions is represented by a singleDiffNodes.- Author:
- Juanco Anez
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisSnake()Is this node aSnake node?-
Methods inherited from class org.assertj.core.util.diff.myers.PathNode
isBootstrap, previousSnake, toString
-
-
-
-
Constructor Detail
-
DiffNode
public DiffNode(int i, int j, PathNode prev)Constructs a DiffNode.DiffNodes are compressed. That means that the path pointed to by the
prevparameter will be followed usingPathNode.previousSnake()until a non-diff node is found.- Parameters:
i- the position in the original sequencej- the position in the revised sequenceprev- the previous node in the path.
-
-
Method Detail
-
isSnake
public boolean isSnake()
Is this node aSnake node?
-
-