forked from nus-cs2103-AY1819S1/addressbook-level4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nus-cs2103-AY1819S1#57 from CS2103-AY1819S1-W12-2/…
…shaw_yeong_changes Update AnalyticsCommand, FinancialDatabaseParser and Deadline classes
- Loading branch information
Showing
11 changed files
with
18,447 additions
and
46 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
package seedu.address.commons.core; | ||
|
||
/** | ||
* Container for user visible messages. | ||
* Represents error messages displayed to the user | ||
*/ | ||
public class Messages { | ||
|
||
public static final String MESSAGE_UNKNOWN_COMMAND = "Unknown command"; | ||
public static final String MESSAGE_INVALID_COMMAND_FORMAT = "Invalid command format! \n%1$s"; | ||
public static final String MESSAGE_INVALID_TRANSACTION_DISPLAYED_INDEX = | ||
"The transaction index provided is invalid"; | ||
public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX = "The transaction index provided is invalid"; | ||
public static final String MESSAGE_TRANSACTIONS_LISTED_OVERVIEW = "%1$d transactions listed!"; | ||
public static final String MESSAGE_INVALID_DATE = | ||
"The transaction deadline must be a valid date in the future in the DD/MM/YYYY format"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/main/java/seedu/address/logic/parser/AnalyticsCommandParser.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* @@author xiaoyeong */ | ||
package seedu.address.logic.parser; | ||
|
||
import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; | ||
|
||
import seedu.address.logic.commands.AnalyticsCommand; | ||
import seedu.address.logic.parser.exceptions.ParseException; | ||
import seedu.address.model.transaction.Deadline; | ||
|
||
/** | ||
* Parses input arguments and creates a new AnalyticsCommand object | ||
*/ | ||
public class AnalyticsCommandParser implements Parser<AnalyticsCommand> { | ||
|
||
/** | ||
* Parses the given {@code String} of arguments in the context of the AnalyticsCommand | ||
* and returns an AnalyticsCommand object for execution. | ||
* @throws ParseException if the user input does not conform the expected format | ||
*/ | ||
public AnalyticsCommand parse(String args) throws ParseException { | ||
try { | ||
if (args != null && args.equals("")) { | ||
return new AnalyticsCommand(); | ||
} | ||
Deadline deadline = ParserUtil.parseDeadline(args); | ||
return new AnalyticsCommand(deadline); | ||
} catch (ParseException pe) { | ||
throw new ParseException( | ||
String.format(MESSAGE_INVALID_COMMAND_FORMAT, AnalyticsCommand.MESSAGE_USAGE), pe); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters