Top Description Constructors Methods
org.apache.commons.collections4.sequence

public Class InsertCommand<T>

extends EditCommand<T>
Class Inheritance

Command representing the insertion of one object of the second sequence.

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.

Since
4.0
See Also
SequencesComparator, EditScript

Constructor Summary

AccessConstructor and Description
public
InsertCommand(final T
the object of the second sequence that should be inserted
object
)

Simple constructor.

Method Summary

Modifier and TypeMethod and Description
public void
accept(final CommandVisitor<T>
the visitor to be accepted
visitor
)

Implements abstract org.apache.commons.collections4.sequence.EditCommand.accept.

Accept a visitor.
Inherited from org.apache.commons.collections4.sequence.EditCommand:
getObject

Constructor Detail

InsertCommandback to summary
public InsertCommand(final T object)

Simple constructor. Creates a new instance of InsertCommand

Parameters
object:T

the object of the second sequence that should be inserted

Method Detail

acceptback to summary
public void accept(final CommandVisitor<T> visitor)

Implements abstract org.apache.commons.collections4.sequence.EditCommand.accept.

Accept a visitor. When an InsertCommand accepts a visitor, it calls its visitInsertCommand method.

Parameters
visitor:CommandVisitor<T>

the visitor to be accepted

Annotations
@Override