01: package wicket.util.diff.myers;
02:
03: /**
04: * <p>Title: </p>
05: * <p>Description: </p>
06: * <p>Copyright: Copyright (c) 2002</p>
07: * <p>Company: </p>
08: * @author not attributable
09: * @version 1.0
10: */
11:
12: /**
13: * A diffnode in a diffpath.
14: * <p>
15: * A DiffNode and its previous node mark a delta between two input sequences,
16: * that is, two differing subsequences between (possibly zero length) matching
17: * sequences.
18: *
19: * {@link DiffNode DiffNodes} and {@link Snake Snakes} allow for compression of
20: * diffpaths, as each snake is represented by a single {@link Snake Snake} node
21: * and each contiguous series of insertions and deletions is represented by a
22: * single {@link DiffNode DiffNodes}.
23: *
24: * @version $Revision: 1.1 $ $Date: 2006/03/12 00:24:21 $
25: * @author <a href="mailto:juanco@suigeneris.org">Juanco Anez</a>
26: *
27: */
28: public final class DiffNode extends PathNode {
29: /**
30: * Constructs a DiffNode.
31: * <p>
32: * DiffNodes are compressed. That means that the path pointed to by the
33: * <code>prev</code> parameter will be followed using
34: * {@link PathNode#previousSnake} until a non-diff node is found.
35: * @param i
36: * @param j
37: *
38: * @param the
39: * position in the original sequence
40: * @param the
41: * position in the revised sequence
42: * @param prev
43: * the previous node in the path.
44: */
45: public DiffNode(int i, int j, PathNode prev) {
46: super (i, j, (prev == null ? null : prev.previousSnake()));
47: }
48:
49: /**
50: * {@inheritDoc}
51: *
52: * @return false, always
53: */
54: public boolean isSnake() {
55: return false;
56: }
57:
58: }
|