Package org.apache.commons.text.diff

Provides algorithms for diff between strings.

The initial implementation of the Myers algorithm was adapted from the commons-collections sequence package.

Since:
1.0
  • Interface Summary 
    Interface Description
    CommandVisitor<T>
    This interface should be implemented by user object to walk through EditScript objects.
    ReplacementsHandler<T>
    This interface is devoted to handle synchronized replacement sequences.
  • Class Summary 
    Class Description
    DeleteCommand<T>
    Command representing the deletion of one object of the first sequence.
    EditCommand<T>
    Abstract base class for all commands used to transform an objects sequence into another one.
    EditScript<T>
    This class gathers all the commands needed to transform one objects sequence into another objects sequence.
    InsertCommand<T>
    Command representing the insertion of one object of the second sequence.
    KeepCommand<T>
    Command representing the keeping of one object present in both sequences.
    ReplacementsFinder<T>
    This class handles sequences of replacements resulting from a comparison.
    StringsComparator
    It is guaranteed that the comparisons will always be done as o1.equals(o2) where o1 belongs to the first sequence and o2 belongs to the second sequence.