public class InsertCommand<T> extends EditCommand<T>
When one object of the second sequence has no corresponding object in the first sequence at the right place, the edit script transforming the first sequence into the second sequence uses an instance of this class to represent the insertion of this object. The objects embedded in these type of commands always come from the second sequence.
SequencesComparator,
EditScript
| Constructor and Description |
|---|
InsertCommand(T object)
Simple constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(CommandVisitor
Accept a visitor.
|
getObjectpublic InsertCommand(T object)
object - the object of the second sequence that should be inserted
public void accept(CommandVisitor<T> visitor)
InsertCommand accepts a visitor, it calls its
visitInsertCommand method.
accept in class
EditCommand<T>
visitor - the visitor to be accepted