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<T> visitor)
Accept a visitor.
|
public InsertCommand(T object)
object
- the object of the second sequence that should be insertedpublic void accept(CommandVisitor<T> visitor)
InsertCommand
accepts a visitor,
it calls its visitInsertCommand
method.accept
in class EditCommand<T>
visitor
- the visitor to be acceptedCopyright © 2010 - 2020 Adobe. All Rights Reserved