<commit_before>package seedu.tasklist.logic.commands;

import seedu.tasklist.logic.commands.exceptions.CommandException;

public class SortCommand extends Command{
    
    public static final String COMMAND_WORD = "sort";
    private final String parameter;

    public static final String MESSAGE_USAGE = COMMAND_WORD
            + ":Sorts task according to the parameter specified. Only 1 of the 4. Name:n"
            + "Priority:p or StartDate: sd or EndDate:ed\n"
            + "Parameters: n, p, sd, ed\n"
            + "Example: " + COMMAND_WORD + "n";

    
    public SortCommand(String parameter) {
        this.parameter = parameter;
    }

    @Override
    public CommandResult execute() throws CommandException {
       
        return null;
    }

}<commit_msg>Update SortCommand.java<commit_after>package seedu.tasklist.logic.commands;


public class SortCommand extends Command{
    
    public static final String COMMAND_WORD = "sort";
    private final String parameter;

    public static final String MESSAGE_USAGE = COMMAND_WORD
            + ":Sorts task according to the parameter specified. Only 1 of the 5. Name:n"
            + "Priority:p or StartDate: sd or EndDate:ed or Deadline:d\n"
            + "Parameters: n, p, sd, ed\n"
            + "Example: " + COMMAND_WORD + " n";
    public static final String MESSAGE_FAILURE = "Invalid sorting parameter used!" + MESSAGE_USAGE;
    public static final String MESSAGE_SUCCESS = "Task sorted according to given parameter.";
    
    public SortCommand(String parameter) {
        switch (parameter) {
        case "d":
            this.parameter = "Deadline";
            break;
        case "sd":
            this.parameter = "Start Date";
            break;
        case "ed":
            this.parameter = "End Date";
            break;
        case "n":
            this.parameter = "Name";
            break;
        case "p":
            this.parameter = "Priority";
            break;
        default:
            this.parameter = null;
        }
    }

    @Override
    public CommandResult execute() {
       
        if(parameter == null) {
            return new CommandResult(MESSAGE_FAILURE);
        }
        model.sortTaskList(parameter);
        return new CommandResult(MESSAGE_SUCCESS); 
    }

}
{'fraction_non_alphanumeric': 0.08805579773321709, 'fraction_numerical': 0.0017436791630340018, 'mean_word_length': 2.13953488372093, 'pattern_counts': {'":': 7, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2012880', 'n_tokens_mistral': 632, 'n_tokens_neox': 605, 'n_words': 187}