|
1 | 1 | package seedu.address.logic.commands.meetings; |
2 | 2 |
|
| 3 | +import static java.util.Objects.requireNonNull; |
| 4 | +import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION; |
| 5 | +import static seedu.address.logic.parser.CliSyntax.PREFIX_END_TIME; |
| 6 | +import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUP; |
| 7 | +import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; |
| 8 | +import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY; |
| 9 | +import static seedu.address.logic.parser.CliSyntax.PREFIX_START_TIME; |
| 10 | + |
3 | 11 | import seedu.address.logic.commands.Command; |
4 | 12 | import seedu.address.logic.commands.CommandResult; |
5 | 13 | import seedu.address.logic.commands.exceptions.CommandException; |
6 | 14 | import seedu.address.model.Model; |
7 | 15 | import seedu.address.model.meeting.Meeting; |
8 | 16 |
|
9 | | -import static seedu.address.logic.parser.CliSyntax.PREFIX_START_TIME; |
10 | | -import static seedu.address.logic.parser.CliSyntax.PREFIX_END_TIME; |
11 | | -import static seedu.address.logic.parser.CliSyntax.PREFIX_NAME; |
12 | | -import static seedu.address.logic.parser.CliSyntax.PREFIX_PRIORITY; |
13 | | -import static seedu.address.logic.parser.CliSyntax.PREFIX_GROUP; |
14 | | -import static seedu.address.logic.parser.CliSyntax.PREFIX_DESCRIPTION; |
15 | | - |
16 | | -import static java.util.Objects.requireNonNull; |
17 | 17 |
|
18 | 18 | public class AddMeetingCommand extends Command { |
19 | 19 | public static final String COMMAND_WORD = "addm"; |
@@ -49,14 +49,14 @@ public AddMeetingCommand(Meeting meeting) { |
49 | 49 | } |
50 | 50 |
|
51 | 51 | @Override |
52 | | - public CommandResult execute(Model Model) throws CommandException { |
53 | | - requireNonNull(Model); |
| 52 | + public CommandResult execute(Model model) throws CommandException { |
| 53 | + requireNonNull(model); |
54 | 54 |
|
55 | | - if (Model.hasMeeting(toAdd)) { |
| 55 | + if (model.hasMeeting(toAdd)) { |
56 | 56 | throw new CommandException(MESSAGE_DUPLICATE_MEETING); |
57 | 57 | } |
58 | 58 |
|
59 | | - Model.addMeeting(toAdd); |
| 59 | + model.addMeeting(toAdd); |
60 | 60 | return new CommandResult(String.format(MESSAGE_SUCCESS, toAdd)); |
61 | 61 | } |
62 | 62 |
|
|
0 commit comments