org.apache.commons.jrcs.diff.myers
Class DiffNode
java.lang.Object
org.apache.commons.jrcs.diff.myers.PathNode
org.apache.commons.jrcs.diff.myers.DiffNode
public final class DiffNode
- extends PathNode
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.
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
.
- Version:
- $Revision: 1.1 $ $Date: 2003/05/10 18:56:10 $
- Author:
- Juanco Anez
Fields inherited from class org.apache.commons.jrcs.diff.myers.PathNode |
i, j, prev |
Constructor Summary |
DiffNode(int i,
int j,
PathNode prev)
Constructs a DiffNode. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DiffNode
public DiffNode(int i,
int j,
PathNode prev)
- Constructs a DiffNode.
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.
- Parameters:
the
- position in the original sequencethe
- position in the revised sequenceprev
- the previous node in the path.
isSnake
public boolean isSnake()
- Is this node a
Snake node
?
- Specified by:
isSnake
in class PathNode
- Returns:
- false, always
Copyright 2002 the Apache Software Foundation
Copyright ? 1999-2001 Juancarlo A?ez, Caracas, Venezuela.
All rights reserved
. http://www.suigeneris.org/jrcs