public InsertItemOperation(final OperationEnvironment environment, final int insertPosition) { super("Adding item to series", environment); if (environment.getSubject() == null) { throw new IllegalArgumentException( "I need a subject item to insert. Is the makeCopy method implemented?"); } myInsertPosition = insertPosition; }
public InsertItemOperation(final OperationEnvironment environment) { this(environment, environment.getSeries().getItems().size()); }