Skip to content

Commit

Permalink
Merge pull request #170 from ErnTekTeoh/dg
Browse files Browse the repository at this point in the history
added javadocs
  • Loading branch information
zhuhanming authored Apr 13, 2020
2 parents 14a0ff6 + dccb2e6 commit 45f72d2
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/main/java/modulo/logic/commands/AddDeadlineCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ public boolean get_isRepeated() {
return this.isRepeated;
}

/**
* Returns the result after execution of AddDeadlineCommand
*
* Deadline will be added to a specified parentEvent, or the current focused event if parentEvent isn't specified
*
* @param model Model of modulo
* @return CommandResult containing info regarding execution of the command
* @throws CommandException If certain prerequisites are unmet
*/
@Override
public CommandResult execute(Model model) throws CommandException {
requireNonNull(model);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/modulo/logic/commands/ClearCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ public class ClearCommand extends Command {
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Clears all data from Modulo.\n"
+ "Example: " + COMMAND_WORD;

/**
* Returns the result after execution of ClearCommand
*
* @param model Model of modulo
* @return CommandResult containing info regarding execution of the command
*/
@Override
public CommandResult execute(Model model) {
requireNonNull(model);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/modulo/logic/commands/ExitCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ public class ExitCommand extends Command {
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Exits Modulo.\n"
+ "Example: " + COMMAND_WORD;

/**
* Returns the result after execution of ExitCommand
*
* @param model Model of modulo
* @return CommandResult containing info regarding execution of the command
*/
@Override
public CommandResult execute(Model model) {
return new CommandResult(MESSAGE_EXIT_ACKNOWLEDGEMENT, false, true, false, false, null, null);
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/modulo/logic/commands/ExportCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ public ExportCommand(Path exportDirectory) {
this.exportDirectory = exportDirectory;
}

/**
* Returns the result after execution of ExportCommand
*
* @param model Model of modulo
* @return CommandResult containing info regarding execution of the command
* @throws CommandException When system fails to write to file
*/
@Override
public CommandResult execute(Model model) throws CommandException {

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/modulo/logic/commands/FindCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ public FindCommand(NameContainsKeywordsPredicate predicate) {
this.predicate = predicate;
}


/**
* Returns the result after execution of FindCommand
*
* @param model Model of modulo
* @return CommandResult containing info regarding execution of the command
*/
@Override
public CommandResult execute(Model model) {
requireNonNull(model);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/modulo/logic/commands/HelpCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ public class HelpCommand extends Command {
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Shows program usage instructions.\n"
+ "Example: " + COMMAND_WORD;

/**
* Returns the result after execution of HelpCommand
*
* @param model Model of modulo
* @return CommandResult containing info on where to seek help
*/
@Override
public CommandResult execute(Model model) {
return new CommandResult(MESSAGE_SHOWING_HELP, true, false, false, false, null, null);
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/modulo/logic/commands/ListCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ public ListCommand(DisplayableType displayableType) {
this.displayableType = displayableType;
}

/**
* Returns the result after execution of ListCommand
*
* @param model Model of modulo
* @return CommandResult containing info regarding execution of the command
*/
@Override
public CommandResult execute(Model model) {
requireNonNull(model);
Expand Down
7 changes: 7 additions & 0 deletions src/main/java/modulo/logic/commands/ViewCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ public ViewCommand(Index index) {
this.index = index;
}

/**
* Returns the result after execution of ViewCommand
*
* @param model Model of modulo
* @return CommandResult containing info regarding execution of the command
* @throws CommandException When index specified is invalid
*/
@Override
public CommandResult execute(Model model) throws CommandException {
requireNonNull(model);
Expand Down

0 comments on commit 45f72d2

Please sign in to comment.