When two objects sequences are compared through the {@link SequencesComparator#getScript SequencesComparator.getScript} method,the result is provided has a {@link EditScript script} containing the commandsthat progressively transform the first sequence into the second one.
There are only three types of commands, all of which are subclasses of this abstract class. Each command is associated with one object belonging to at least one of the sequences. These commands are {@link InsertCommand InsertCommand} which correspond to an object of the second sequence beinginserted into the first sequence, {@link DeleteCommand DeleteCommand} whichcorrespond to an object of the first sequence being removed and {@link KeepCommand KeepCommand} which correspond to an object of the firstsequence which equals
an object in the second sequence. It is guaranteed that comparison is always performed this way (i.e. the equals
method of the object from the first sequence is used and the object passed as an argument comes from the second sequence) ; this can be important if subclassing is used for some elements in the first sequence and the equals
method is specialized.
@see SequencesComparator
@see EditScript
@since 4.0
@version $Id: EditCommand.java 1477760 2013-04-30 18:34:03Z tn $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|