private static final class ListUtils.LcsVisitor<E> extends java.lang.Object implements CommandVisitor<E>
Modifier and Type | Field and Description |
---|---|
private java.util.ArrayList<E> |
sequence |
Constructor and Description |
---|
LcsVisitor() |
Modifier and Type | Method and Description |
---|---|
java.util.List<E> |
getSubSequence() |
void |
visitDeleteCommand(E object)
Method called when a delete command is encountered.
|
void |
visitInsertCommand(E object)
Method called when an insert command is encountered.
|
void |
visitKeepCommand(E object)
Method called when a keep command is encountered.
|
private final java.util.ArrayList<E> sequence
public void visitInsertCommand(E object)
CommandVisitor
visitInsertCommand
in interface CommandVisitor<E>
object
- object to insert (this object comes from the second sequence)public void visitDeleteCommand(E object)
CommandVisitor
visitDeleteCommand
in interface CommandVisitor<E>
object
- object to delete (this object comes from the first sequence)public void visitKeepCommand(E object)
CommandVisitor
visitKeepCommand
in interface CommandVisitor<E>
object
- object to keep (this object comes from the first sequence)public java.util.List<E> getSubSequence()