src/main/java/seedu/address/logic/commands/job/SortJob.java
public CommandResult execute(Model model) throws CommandException {
        requireNonNull(model);
        List<Job> lastShownList = model.getFilteredJobList();
        if (lastShownList.size() == 0) {
            throw new CommandException(Messages.MESSAGE_EMPTY_JOB_LIST);
        }
        model.sortJob();
        return new CommandResult(String.format(MESSAGE_SORT_JOB_SUCCESS));
    }
/**
     * Execute the sort job command.
     * @param model {@code Model} which the command should operate on.
     * @return the command result.
     */
Execute the sort job command.
@param model  Model which the command should operate on.
@return the command result.
Execute the sort job command . @param model Model which the command should operate on . @return the command result .
public CommandResult execute(Model model) throws CommandException {
        requireNonNull(model);
        List<Job> lastShownList = model.getFilteredJobList();
        if (lastShownList.size() == 0) {
            throw new CommandException(Messages.MESSAGE_EMPTY_JOB_LIST);
        }
        model.sortJob();
        return new CommandResult(String.format(MESSAGE_SORT_JOB_SUCCESS));
    }
public CommandResult execute ( Model model ) throws CommandException { requireNonNull ( model ) ; List < Job > lastShownList = model . getFilteredJobList ( ) ; if ( lastShownList . size ( ) == 0 ) { throw new CommandException ( Messages . MESSAGE_EMPTY_JOB_LIST ) ; } model . sortJob ( ) ; return new CommandResult ( String . format ( MESSAGE_SORT_JOB_SUCCESS ) ) ; }
Execute the sort job command.
Execute the sort job command .