Class Snake

java.lang.Object
org.assertj.core.util.diff.myers.PathNode
org.assertj.core.util.diff.myers.Snake

public final class Snake extends PathNode
Copy from https://code.google.com/p/java-diff-utils/.

Represents a snake in a diffpath.

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.

Author:
Juanco Anez
  • Constructor Details

    • Snake

      public Snake(int i, int j, PathNode prev)
      Constructs a snake node.
      Parameters:
      i - the position in the original sequence
      j - the position in the revised sequence
      prev - the previous node in the path.
  • Method Details

    • isSnake

      public boolean isSnake()
      Is this node a Snake node?
      Specified by:
      isSnake in class PathNode
      Returns:
      true always