package seedu.taskboss.logic.parser;

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

import java.util.Optional;
import java.util.Set;

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) {

        Set<Integer> index = parseIndex(args);

        if (!index.isPresent()) {
            return new IncorrectCommand(
                    String.format(MESSAGE_INVALID_COMMAND_FORMAT, DeleteCommand.MESSAGE_USAGE));
        }

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

    private Set<Integer> parseIndex(String indexList) {
        String trimmedList = indexList.trim();
        String[] indexes = trimmedList.split(" ");

        return indexes;
    }
}

@@ -968,24 +968,81 @@
 ndexList) %7B%0A
+        Set%3CInteger%3E taskIndex = new HashSet%3CInteger%3E();%0A
         Stri
@@ -1127,16 +1127,24 @@
 t(%22 %22);%0A
+        
 %0A       
@@ -1148,22 +1148,116 @@
     
-return indexes
+for (String index : indexes) %7B%0A            taskIndex.add(Integer.parseInt(index));%0A%0A        return taskIndex
 ;%0A  

Update DeleteCommandParser.java