org.apache.commons.collections4.sequence
Class DeleteCommand<T>

java.lang.Object
  extended by org.apache.commons.collections4.sequence.EditCommand<T>
      extended by org.apache.commons.collections4.sequence.DeleteCommand<T>

public class DeleteCommand<T>
extends EditCommand<T>

Command representing the deletion of one object of the first sequence.

When one object of the first sequence has no corresponding object in the second 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 deletion of this object. The objects embedded in these type of commands always come from the first sequence.

Since:
4.0
Version:
$Id: DeleteCommand.java 1477760 2013-04-30 18:34:03Z tn $
See Also:
SequencesComparator, EditScript

Constructor Summary
DeleteCommand(T object)
          Simple constructor.
 
Method Summary
 void accept(CommandVisitor<T> visitor)
          Accept a visitor.
 
Methods inherited from class org.apache.commons.collections4.sequence.EditCommand
getObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeleteCommand

public DeleteCommand(T object)
Simple constructor. Creates a new instance of DeleteCommand.

Parameters:
object - the object of the first sequence that should be deleted
Method Detail

accept

public void accept(CommandVisitor<T> visitor)
Accept a visitor. When a DeleteCommand accepts a visitor, it calls its visitDeleteCommand method.

Specified by:
accept in class EditCommand<T>
Parameters:
visitor - the visitor to be accepted


Copyright © 2001–2013 The Apache Software Foundation. All rights reserved.