package seedu.taskboss.logic.parser;

import static seedu.taskboss.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT;

import java.util.Optional;

import seedu.taskboss.logic.commands.Command;
import seedu.taskboss.logic.commands.DeleteCommand;
import seedu.taskboss.logic.commands.IncorrectCommand;

/**
 * Parses input arguments and creates a new DeleteCommand object
 */
public class DeleteCommandParser {

    /**
     * Parses the given {@code String} of arguments in the context of the DeleteCommand
     * and returns an DeleteCommand object for execution.
     */
    public Command parse(String args) {

        Optional<Integer> index = ParserUtil.parseIndex(args);
        if (!index.isPresent()) {
            return new IncorrectCommand(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));
        }

        return new DeleteCommand(index.get());
    }

}

@@ -608,16 +608,24 @@
 args) %7B%0A
+        
 %0A       
@@ -625,24 +625,19 @@
         
-Optional
+Set
 %3CInteger
@@ -650,19 +650,8 @@
 x = 
-ParserUtil.
 pars
@@ -664,16 +664,17 @@
 (args);%0A
+%0A
         
@@ -900,12 +900,212 @@
 );%0A    %7D
+%0A    %0A    public static String%5B%5D parseIndex(String indexList) %7B%0A        String trimmedList = indexList.trim();%0A        String%5B%5D indexes = trimmedList.split(%22 %22);%0A        %0A        return indexes;%0A    %7D
 %0A%0A%7D%0A

Update DeleteCommandParser.java