org.weborganic.ox.util
Class DiffXBasic

java.lang.Object
  extended by com.topologi.diffx.algorithm.DiffXAlgorithmBase
      extended by org.weborganic.ox.util.DiffXBasic
All Implemented Interfaces:
DiffXAlgorithm

public final class DiffXBasic
extends DiffXAlgorithmBase

Performs the diff comparison using the LCS algorithm.

Version:
30 October 2013
Author:
Christophe Lauret

Constructor Summary
DiffXBasic(EventSequence seq0, EventSequence seq1)
          Creates a new DiffXAlgorithmBase.
 
Method Summary
 int length()
          Returns the length of the longest common sequence.
 void process(DiffXFormatter formatter)
          Writes the diff sequence using the specified formatter.
 
Methods inherited from class com.topologi.diffx.algorithm.DiffXAlgorithmBase
getFirstSequence, getSecondSequence
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiffXBasic

public DiffXBasic(EventSequence seq0,
                  EventSequence seq1)
Creates a new DiffXAlgorithmBase.

Parameters:
seq0 - The first sequence to compare.
seq1 - The second sequence to compare.
Method Detail

length

public int length()
Returns the length of the longest common sequence.

Returns:
the length of the longest common sequence.

process

public void process(DiffXFormatter formatter)
             throws IOException
Writes the diff sequence using the specified formatter.

Parameters:
formatter - The formatter that will handle the output.
Throws:
IOException - If thrown by the formatter.